For each item
Run the steps that follow once for every item of a list.
flow.forEach runs the steps wired to Each item once per item of a list, then continues from When finished. It can't fail.
Settings
| Setting | What it does |
|---|---|
| List | The list, such as {var.bannedWords} or {option.names}. |
| Items are separated by | Commas or New lines. |
Ways out
| Way out | Taken when |
|---|---|
Each item | For every item. Wire it to the steps to repeat. |
When finished | After the last item. |
Produces
{loop.item}, the item this pass is for, and {loop.index}, its position from 1.
Notes
- Blank items are skipped, so
a,,bis two items. - At most 500 items.
- To go through rows of a collection, use For each row.
Example
Check a message against each word in {var.bannedWords} and stop the loop at the first match. (A Message check does this in one step.)