For Each
Runs the activities in the body for each item in a collection. The current item is used in the body through the loop variable (default name Item).
⬅️INPUT
Parameter | Type | Required | Description |
|---|---|---|---|
|
| ✅ Yes | The collection to iterate over (array, list, etc.). If it is not a collection or is empty (null), the loop does not run. If the items cannot be converted to the type of the loop variable, the activity throws an error. |
➡️OUTPUT
Parameter | Type | Description |
|---|---|---|
|
| Inside the body, the number of the current item (one-based). |
Usage
On the canvas there are the name of the loop variable under the For Each label, the Values field (
Values) under the in label, and the body (Add Activity).The type of the loop variable is selected with Argument type in the properties panel (default
String).Inside the body, Break ends the loop immediately; Continue skips the rest of the iteration and moves on to the next item.