Collection variables
A Collection variable is an index-based list of values. It contains multiple items and is useful for storing and operating on query results. A simple collection variable is limited to one column of data while a complex collection variable includes multiple columns of data.
For example, you can use a collection variable in the Query List action to get the names of all items in a list and store them in a collection variable. This collection variable can be used in other actions, such as in the Get item from collection action to retrieve the name of an item.
Create a collection variable
You can create a collection variable from the Action configuration window when you are configuring a workflow action or from the toolbar of the Designer page.
From the Designer toolbar:
- On the toolbar of the Designer page, click Variables. The Variables dialog box appears.
- Click New and fill in the following:
- For Name, type the variable name you want to use.
- Select Collection as the Type.
- If you want to specify the variable as a start variable, select the Initiation check box .
- Click Save.
During action configuration:
- In the Action configuration window, click in a field that accepts collection variables.
- Do one of the following depending on the method available;
- On the drop-down list that appears, click Create New Variable.
- On the Insert Reference pane that appears, expand the Workflow Variables section and click Create New Variable.
- Do the following in the Workflow Variables pane to create the variable:
- For Name, type the variable name you want to use.
- Select Collection as the Type.
- Click Create.