Create List
Create List
Section titled “Create List”Type: list-create · Package: Collections Activities v1.0.3 · Output: List
Creates a list, empty or already holding its initial items. It is the starting point to accumulate elements throughout a flow (for example, inside a loop) or to define a fixed set of values at once.
How it works
Section titled “How it works”In the Designer, items is edited with a list editor: one item per row. Each item accepts a literal or an expression, evaluated when the activity runs. If you leave items empty, the list is created empty and you then add items with Add to List.
The created list accepts elements of any type. If items is an expression that already returns a List<object>, that same list is used; any other result produces an empty list.
Required parameters
Section titled “Required parameters”None.
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
items | List | — | Initial items. Leave empty for an empty list. |
Output
Section titled “Output”Returns a List (List<object>) with the given items, in the same order, or empty. Store it with the activity’s output field.
Common errors
Section titled “Common errors”This activity practically cannot fail: it can only fail if the expression of an item in items has an error, and the message is then that expression’s error.
Example
Section titled “Example”Create List → output: subjectsFor Each items = emails itemVariable = email └─ activities: Add to List list = subjects item = email.Subject
Create List items: [ "Pending", "Overdue" ] → output: statusesToReviewRelated activities
Section titled “Related activities”- Add to List — add elements.
- Create Dictionary — create a dictionary.