Query List

<< Click to Display Table of Contents >>

Navigation:  Custom Actions > Variables > How to set dynamic values for variables >

Query List

Query list action could return single or collection of items based on the “Type” selection (see screenshot below). If the query list action is configured to return single item, then we can read that return item column values and store in variables for later usage.

 

Variable value Supports following types:

Literal/Custom values

Another field values (Place holders of current item and query list returned item are supported)

Functions

 

Using the “Define Variable Mappings” section in the Query List action settings page, we can assign values to variables (See screenshots below).

 

 Set query list variable

 

With expression builder:

 

 Query list variable with expression Builder

 

Without expression builder:

 

 Query list variable without EB

 

Syntax for defining variable with query list placeholders within Query List Action: {CurrentAction}##[Assigned Staff|AssignedStaff]

Syntax for Query List action result value if used within another action column mapping or variable mapping: Query List action name##[Column display name|Column Internal Name]

 

If we store the return item’s column value like in above screenshot, it stores the object value in the variable.

 

For example, if we store the multiple selections enabled person or group column value, then it stores the collection of selected users so later we can use this variable either in column mappings or use this to run and create one item per each user in this variable value. This is same if we store the multiple selection enabled lookup column value.

 

If we store literal/custom value, simple column place holders like text column, choice column etc. that returns simple string values, we can use these variables only in the column mappings and we cannot use them to run create item actions.

 

Refer “How to use variables in actions” section for more details on how to read the required value from variable to use in column mappings.