Dictionary variables
A Dictionary variable is a variable that contains a group of name-value pairs. It can hold a collection of other variables and multiple data types can be contained in a single dictionary variable.
Dictionary variables are useful when you want to store more than just one type of data in a variable. For example, you might need to save a name, address, and start date of an employee in a variable. These are all different data types and using a dictionary variable allows you to store all these in a single variable.
For more information about dictionary variables, see Understanding Dictionary actions in SharePoint Designer 2013.
Create a dictionary variable
You can create a dictionary 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 Dictionary 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 dictionary 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 Dictionary as the Type.
- Click Create.