Create List Step
Use the Create List step to create a new SharePoint list in a SharePoint site. You could use the Create List step in a workflow, for example, to create a Pending Orders list that is later filled by another workflow with orders waiting to be shipped.
During this step in a workflow, K2 creates an application on this list if it's not already integrated with K2. This allows you to use of SharePoint-related steps such as the Create List Item step in the same workflow without having to create a K2 Application for this list beforehand. When the list is created, the following are enabled:
- A SmartObject based on the list is created.
- You can use the SmartObject to create list items in later steps in the workflow using the Create List Item step
- After the first instance of the workflow creates the list, you can open the K2 application and add other elements such as views, forms and workflow
- Use the SmartObject in other workflows
Drag the Create List step from the SharePoint category, Favorites bar, or the Recent category onto the canvas.
Example of a Create List step in a workflow
- From the Toolbox click the SharePoint category, the Lists category and then drag the Create List 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 List tab. Use this tab to configure the list properties.
- From the drop down menu select Browse and navigate to a location to add the list.
- Select the site and click OK.
- Select the template from the List Template drop down menu.
- In the Name field type a value or use inline functions or 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 the Add button.
- 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 List Option section select the options.
- With the step selected, select the Properties tab.
- Click the Errors tab.
- If the option is selected - the List 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 this section to specify the site where the list is to be created. Browse to select and specify an entity or construct your own by using a reference created earlier in the workflow. | Click the drop down menu and select Browse to browse to a specific site. |
List Template | Use this to select or specify a SharePoint template for the new list . Templates determine the default views and organization of the list. Note: When a SmartObject load method property is used, an input property is required for the correct information to load. | Click the List Template drop down menu to select the template. |
Properties | Use this to add properties and detail for the list. Type values or create dynamic values by dragging Functions, Fields, SmartObjects and Workflow-related items from the Context Browser into the fields. | Click the Add button to add a property. Click the drop down 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 List Later | Use this to create a reference to the new SharePoint list 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. |
List Options | ||
Display on SharePoint Quick Launch | Select this option to add the library to the SharePoint Quick Launch bar. By default, this option is selected. | Check the check box to enable this option. |
Allow folder creation | Select this option to allow folders within the list. | Check the check box to enable this option. |
Enable versioning | Select this option to enable SharePoint version control. New list items get a version number. | Check the check box to enable this option. |
Hidden List | Select this option to hide the list in SharePoint. | Check the check box to enable this option. |
For more information about the different browse states and errors, see the Browse State 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.
For more information on the list options, see the List Options section within the table above.
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 field. |
Reset link | Use the link to reset any changes to the title. | Click the Reset link to reset the Title 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 Description 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 exception/s:
Exception | Explanation | How to Use |
---|---|---|
Continue on error | When this option is selected the workflow is not in an error state, but merely continues executing the next step. | Check the check box to continue the workflow. |
Use existing list on site if found | On step execution and a match is found between the new and an existing List (name), the following options are available: | Check the check box to use existing List. 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.
- Please see the Supported Artifacts topic for additional information on support for various SharePoint types and templates.