Create Library step
Use the Create Library step to create a new SharePoint library in a SharePoint site. During this step in a workflow, K2 creates an application on the library if it's not already integrated with K2. This allows you to use other SharePoint-related steps, such as Add Document, in the same workflow without having to manually create an application for the library. When the library is created, the following are enabled:
- A SmartObject based on the new library is created
- You can use the SmartObject to upload documents in later steps in the workflow using the Add Document step
- After the first instance of the workflow creates the library, you can open the K2 application and add other elements to it such as views, forms and workflow
- Use the SmartObject in other workflows
Drag the Create Library step from the SharePoint category, Favorites bar, or the Recent category onto the canvas.
Example of a Create Library step in a workflow- From the Toolbox click the SharePoint category, the Libraries category and then drag the Create Library step onto the canvas.
- Select the added step and click the expand / collapse toggle to expand the Configuration Panel. You can also double click the step to expand the panel.
- Select the Create Library tab. Use this tab to configure the library properties.
- From the menu select Browse and navigate to a location to add the library.
- Select the site and click OK.
- Select the template from the Library Template menu.
- In the Name field type a value, use inline functions, or use dynamic fields by clicking the expand or collapse toggle to expand the Context Browser. Within the Context Browser, select inline functions from the Functions, Fields, SmartObjects or the Workflow categories to define your function. Click and drag the function on to the field.
- To add additional properties, click Add.
- To delete properties, select them and click the Trash bin.
- To create a reference click Create. Reuse this reference in the current step or from another step in your workflow.
- To edit the auto-generated reference title, click Edit.
- To locate the added reference, expand the Context Browser, select Fields and then expand the Reference section.
- From the Library Options section select the options.
- With the step selected, select the Properties tab.
- Click the Errors tab.
- If the option is selected - the library is reused.
- If the option is not selected - Runtime exception error occurs.
Your changes are automatically saved.
The following table explains the options available on this tab:
Option | Explanation | How to Use |
---|---|---|
Pick Site | Use the Pick Site menu to specify the site where the library is to be created. Browse to a select and specify a site or construct your own by using a reference created earlier in the workflow. | Click the menu and select Browse to browse to a specific one. |
Library Template | Use this to select or specify a SharePoint template for the new library . Templates determine the default views and organization of the library. When a SmartObject load method property is used, an input property is required for the correct information to load. | Click the Library Template menu to select the template. |
Properties | Use this to add properties and detail for the library. Type values or create dynamic values by dragging Functions, Fields, SmartObjects and Workflow-related items from the Context Browser into the fields. | Click Add to add a property. Click the menu to select the property. Type values or create dynamic values by dragging Functions, Fields, SmartObjects and Workflow-related items from the Context Browser into the fields. To delete properties, select them and click the Trash bin. |
Use Library Later | Use this to create a reference to the new SharePoint library to use from other steps within the workflow. | Click the Create link to create a reference. Click the Edit link to edit the reference name. If you edited the reference name and want to reset it, click the Reset Name link. |
Library Options | ||
Display on SharePoint Quick Launch | Select this option to add the library to the SharePoint quick launch panel. By default, this option is selected. | Check the check box to enable this option. |
Allow folder creation | Select this option to allow the creation of folders within the library . By default, this option is selected. | Check the check box to enable this option. |
Enable versioning | Select this option to enable SharePoint version control. New documents are given a version number. | Check the check box to enable this option. |
Enable Minor Versioning | Select this option to allow for "dot releases" of documents, such as version 1.3. | Check the check box to enable this option. |
Hidden Library | Select this option to hide the library in SharePoint. | Check the check box to enable this option. |
For more information about the different browse states and errors, see the Browse States topic.
For more information on how to use the breadcrumb bar, see the How to use the Breadcrumb topic.
For more information on how to use Smartfields see the Smartfield Composer topic. Added filters can be grouped together to form parameters. To group parameters, click the AND button.
The following table explains the options available on this tab:
Option | Explanation | How to Use |
---|---|---|
Title / Name | By default, each step on the canvas has a step title. You can change this title to suit your workflow logic and show it on the canvas by checking the Show Label box. | Enter a value into the Title/Name field. |
Reset link | Use the link to reset any changes to the title. | Click the Reset link to reset the Title/Name field to default value. |
Show Label | Allows you to see the step label on the canvas. The label shows the value of the title. | Check the check box to display step label on the canvas. |
Description | Allows you to add a detailed description for the step. | Enter a value into the Create New field. |
Notes | Allows you to add additional notes for the step. | Enter a value into the Notes field. |
Different types of exceptions can occur on a step, such as:
Type | Description |
---|---|
Known exceptions | Any SmartWizard or standard wizard that has Boolean options for handling known exceptions have these options displayed as check boxes in the Known exceptions section of the Exceptions tab. |
Unhandled exceptions | Any unknown runtime exceptions. |
The tab contains the following Known exceptions:
Exception | Explanation | How to Use |
---|---|---|
Continue on error | On step execution and an error occurs, continue to the next step in the workflow. | Check the check box to continue the workflow. |
Use existing Library | On step execution and a match is found between the new and an existing Library (name), the following options are available: | Check the check box to use existing library. Uncheck the check box causes Runtime exception error. |
The tab contains the following unhandled exception:
Exception | Explanation | How to Use |
---|---|---|
Log Exception | Logs the exception to the error log. | Check the box to log the exception. |
-
Custom templates cannot be enumerated by the SharePoint CSOM API and are therefore not available to use for third-party applications like K2. This means you will not be able to use Custom list/library templates.
- See the Supported Artifacts topic for additional information on support for various SharePoint types and templates.