Get an Item from a Dictionary
Access a variable item from within a dictionary variable.
Action settings
Do one of the following to open the Action configuration window:
- Double-click the action.
- Click
on the action and then click Configure.
See Action configuration window for more information.
Dictionary |
Name of the dictionary variable (or collection variable containing a dictionary variable) from which to get the variable item.
|
Item Name or Path |
The item name of the dictionary variable you wish to extract.
Format requirements and example entries
Format requirements:
- Enclose workflow variables first in curly brackets ( { } ) and then in parentheses. The required format is as follows:
({Variable:myVariableName}) . When you insert a variable from the Insert Reference dialog box, the variable is automatically enclosed in curly brackets.
- Use the following format for a nested dictionary: dictionary/item/(path value). The path value must be enclosed in parentheses.
- For JSON data, such as that returned from the SharePoint REST service, use the SharePoint internal names of columns and properties; separate columns and properties with a forward slash (/). For example, use "Author/LastName" for the Created By column and Last Name property. You can find internal column names by checking the properties of the column in the list or document library. Right-click the column, and then click Properties. The internal name of a column appears in the Address (URL) property after "Field=".
- When referencing items in an array, use "(0)" for the first item, "(1)" for the second item, and so on.
Example entries:
- Workflow variable:
({Variable:myIndex})
- Path value to first item in an array: (0)
- Path value to first item in a column: (0)/ColumnName
- Path value to first item in a column's attribute in a Person/Group field: (0)/PersonColumnName/Attribute
- Nested dictionary (from a call to a SharePoint REST service), referencing the path value to the first item in an array: d/results/(0)
|
Output |
The variable to store the variable item extracted from the dictionary variable.
|
For more information about how to use Lookups in configuration fields, see
Lookups in action configuration fields.