Loop
Repeat the steps inside: a number of times, while a condition holds, or once for each item, row, file, e-mail and so on.
Command in the Core toolkit · id core/loop · 16 inputs (1 required), no outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Iterator | String | Yes | Iterator kind or package/iterator address; triggers waits for the events of the loop's handlers and runs the steps of the handler whose event came first. | |
| Over | Any | No | Collection for list, dictionary and table_rows iterators. | |
| Count | Number | No | Repetitions for the times iterator. | |
| Condition | Any | No | Condition for the while iterator, checked before each pass. | |
| Iterator args | Dictionary | No | Arguments for a toolkit iterator. | |
| As | String | No | Declared variable that receives the current item. | |
| Index | String | No | Declared Number variable that receives the zero-based index. | |
| Columns to | Dictionary | No | Column name to a declared variable: each pass puts that column of the current row (or key of the current record) in the variable. | |
| Maximum iterations | Number | No | 100000 | Safety limit; the loop fails with LOOP.LIMIT when reached. |
| From index | Number | No | First zero-based item or row to visit (list, dictionary, table and toolkit iterators); from the first when empty. | |
| To index | Number | No | Last zero-based item or row to visit, included; up to the last when empty. | |
| Step | Number | No | 1 | Visit every n-th item; for the times iterator, the amount the counter grows each pass. |
| Start | Number | No | 0 | First counter value for the times iterator. |
| Reverse | Boolean | No | false | Visit the items in reverse order (list, dictionary, table and toolkit iterators). |
| Check at end | Boolean | No | false | While iterator: check the condition after each pass, so the children run at least once. |
| Label | String | No | Name of this loop, so Exit loop and Continue loop inside nested loops can target it. |