How to create a list of item
Comments
-
[font=Roboto, Arial, Helvetica, sans-serif]Hi, I am struggling to find a way create a list dynamically. I used a fetch step to fetch some entities and then use for each step to get each item. Then I want to create a new list with a different data structure (as build data) to add to a new list and return as the output of a flow. I used the Add Item to List step but I am confused two of the parameters - Original List & New List. I do not know how to set these 2 parameters so that as for each end, I have a new List containing a list of items I added in the Foreach step. Any help would be appreciated.[/font]
-
In order to dynamically create a list of a type created with data from another type and use that list as an output, you can follow these steps. First, use a Create Data step to define a list of your output type and set the input to ignore. We now have a target for our Add Item to List step. Next, we can use a Fetch Entities step to gather all of your output objects. Map the results from your Fetch Entities step into a ForEach step and set the Type Name to the type name of your output type. If youre using multiple ForEach loops in your flow, you may want to rename the outputs for their next items and indexes. Inside of this ForEach loop, we can then use another Create Data step to map our current items properties over to a new output object. For your Add Item to List step, the mapping is as follows: set Original List to Select From Flow and select the list you created in the first Create Data Step, map the new output object to New Item, and for New List change the output to Change Value and select the same list as used in Original List. Once those mappings are finished, you can configure your End step to output a list of your output type and map your newly minted list into it by changing the mapping to Join Arrays and selecting the new list for Item 0.
Howdy, Stranger!
Categories
- 4.2K All Categories
- 67 General
- 11 Training
- 202 Installation / Setup
- 1.1K Flows
- 106 Rules
- 262 Administration
- 212 Portal
- 490 General Q & A
- 695 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 52 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 179 Pages
- 5 Process Mining
- New Features
- 179 Datastructures
- 69 Repository
- 221 Integrations
- 28 Multi-Tenant
- 27 SDK
- 78 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 83 Lunch And Learn Questions