Skip to main content

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​

InputTypeRequiredDefaultWhat it is
IteratorStringYesIterator 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.
OverAnyNoCollection for list, dictionary and table_rows iterators.
CountNumberNoRepetitions for the times iterator.
ConditionAnyNoCondition for the while iterator, checked before each pass.
Iterator argsDictionaryNoArguments for a toolkit iterator.
AsStringNoDeclared variable that receives the current item.
IndexStringNoDeclared Number variable that receives the zero-based index.
Columns toDictionaryNoColumn name to a declared variable: each pass puts that column of the current row (or key of the current record) in the variable.
Maximum iterationsNumberNo100000Safety limit; the loop fails with LOOP.LIMIT when reached.
From indexNumberNoFirst zero-based item or row to visit (list, dictionary, table and toolkit iterators); from the first when empty.
To indexNumberNoLast zero-based item or row to visit, included; up to the last when empty.
StepNumberNo1Visit every n-th item; for the times iterator, the amount the counter grows each pass.
StartNumberNo0First counter value for the times iterator.
ReverseBooleanNofalseVisit the items in reverse order (list, dictionary, table and toolkit iterators).
Check at endBooleanNofalseWhile iterator: check the condition after each pass, so the children run at least once.
LabelStringNoName of this loop, so Exit loop and Continue loop inside nested loops can target it.