- 07 Dec 2020
- 1 Minute to read
- Print
- DarkLight
Using List Mapping Step
- Updated on 07 Dec 2020
- 1 Minute to read
- Print
- DarkLight
Overview
The List Mapping Step allows users to change a list from one type of structure, into a different type of structure. This helps in the context of API calls because it can change the XML, JSON, or other list types into a different data structure. There are 3 main properties of the list mapping step:
Properties | |
INPUTS | Takes in a list of user defined types or primitive types |
Output Type | The type of INPUTS will be changed to |
Show Item Mapping Editor | The mapping editor to map the desired data fields from the INPUTS type to the Output Type |
To prepare for this example, create a database structure with the following fields.
DisplayValue | |
Display | String |
Value | String |
Example
To utilize a List Mapping Step in an example, create a flow, and give it a name. Once you are in the flow designer drag a fetch Entities Step and a List Mapping Step onto the flow canvas. On the fetch entities step, select the 'Account' type under 'Type Name'
On the List Mapping Step, set the output type to 'DisplayValue', then map the 'Entity Results' from to the input of the list mapping step, and click on the Show Item Mapping Editor.
In the Show Item Mapping Editor, the variable that is mapped into the List Mapping Step will be called the __INPUTS. It will be located in the bottom left of the mapping editor. Expand the __INPUTS variable and map the 'Email Address' field and the 'AccountID' field to 'Display' and 'Value' fields of the DisplayValue Data structure.
When this flow runs, what the List Mapping Step will do is take the values 'AccountID' and 'EmailAddress' from the decisions account table. It will then pass those values to the fields in the 'DisplayValue' data structure.