Workflow Blocks
Loop
Run the Loop branch once for every item or group in a list, then continue through Done.
Loop runs the steps on its Loop path once for every item in a list, then continues through Done.
When to use it
Use it to act on each item of a list — email every record Find Records returned, or update each row of an array a Workflow Trigger received.
Settings
| Setting | What it does |
|---|---|
| Source list | A list produced by an earlier step. Required. |
| Group by | Optional. Pick one or more fields; items with matching values run together as one group. |
Variables
These are available only to steps on the Loop path. With marker FO1:
| Variable | Type | Notes |
|---|---|---|
FO1.item | per list | The current item, for a list of plain values. |
FO1.item.<field> | per field | One per field of the current item. |
FO1.index | Number | The current item's number. |
FO1.total | Number | How many items or groups there are. |
FO1.groupKey | Text | The current group, when grouping. |
FO1.batch | Array | The items in the current group. |
FO1.instanceKey | Text | A key for this pass through the loop. |
Paths
| Path | Taken when |
|---|---|
| Loop | Once per item or group. |
| Done | After the last item or group. |
Connect the last step of the Loop path back into the Loop block so it moves on to the next item.
Example
Find Records in Many mode returns overdue tasks. A Loop over its records list, grouped by Owner, sends one Send Email per owner. Done leads to End.
Limits
- Up to 500 items or groups per loop.