- 06 Jul 2021
- 2 Minutes to read
- Print
- DarkLight
List Builder Overview
- Updated on 06 Jul 2021
- 2 Minutes to read
- Print
- DarkLight
Overview
The Create List Builder is a step that is used to create or manipulate List Data. This List Data is specified on the step by defining the desired ListType. Upon running Create List Builder, the step provides users access to additional steps that may be used to append and further edit the List through way of various Methods. The following document demonstrates how to utilize a Create List Builder step within a Flow to create a List.
Summary of List Builder Steps
Step Name | Step Function |
---|---|
Add | Adds an item to the selected List Builder; item's Type corresponds with List Builder's ListType. |
Add If Does Not Exist | Adds an item to a selected List Builder if the item does not currently exist on the List. Outputs a True/False path. |
Clear | Clears out the contents of a List Builder. |
Contains | Evaluates whether the List contains a certain item; outputs True or False |
Copy To | Copies a List of objects (array) to a specified location (array index). |
IndexOf | Returns the index of a specified item. |
Insert(index Int32, ITEM TYPE) | Inserts an item into a List by designating the item and an index location. |
Remove | Removes a specified item from the List. |
RemoveAt(index Int32) | Removes an item from the List based on index location. |
Example
The following example demonstrates how to utilize the Create List Builder step to create a String List. To do so:
- From a DesignerProject, select the CREATE FLOW button from the Global Action Bar, then CREATE a new Flow.
- From the Flow Designer, attach a Create List Builder step from Steps > Data > List, to the Start and End steps.
- From the Properties tab of the Create List Builder step, under [Settings] > ListType, select the desired option (for this example String [Text]).
- Save the Flow, then run it in the Debugger via the Debug link. Then close the Debugger.
- Back in the Flow Designer, navigate to Steps > [Data in Flow] > List > [Metods]. Add an Add(item String) step after the Create List Builder step.
From the Properties of the List Add step, Constant map the desired String value to item.
From the same [Methods] category, add an AddIfDoesNotExist step after the List Add step. Under Properties, Constant map a value for item.
Attach an Insert step after List AddIfDoesNotExist. From the newly added step's Properties tab, Constant map the desired index (for this example "2") and item values.
Additional Information on IndexThe index Input is an Int32 value used to determine where to insert the defined item value. The index number starts from 0 (representing the first place in the List) and cannot exceed the number that follows in the sequence of items within the List.From the Favorite Steps category, add a Show Form step after the List Insert step. From the Properties tab, select PICK OR CREATE FORM, then CREATE a new Form.
From the Form Designer, add a List Box component from Form Controls > Data to the Form. Under Properties > Input Data, provide the desired List Items Data Name, and select the corresponding Type from the dropdown. From the Favorite Components category, add a Button component labeled "Done". Save and close the Form.
Back in the Flow Designer, attach the Done path to the End step. From the Properties tab of the Form step, Select From Flow map List.DistictList to String List and set selected String List to Ignore.
Save and if desired, close the Flow.
Debug
- From the Flow Designer, select the Debug link from the top Action bar. Then click FULL.
- Upon reaching the Form step, compare the resulting List to the Input values.
- Select one of the List items, then click Done.