Handbook · Reference · Blockly · Loops

Blockly: Loops

Where in the UI. Scripts tab toolbox.

Repeat, while, for, for-each, plus item-ref list length helpers.

Block idRead asPurpose
controls_repeat_extrepeat extRepeat n times.
controls_whileUntilwhileUntilWhile / until loop.
controls_forforCount from A to B by step.
controls_forEachforEachFor each item in a list.
containd_item_ref_list_lengthitem ref list lengthArray length for child/sibling/graph/placeholder/root item id lists
containd_item_ref_list_last_indexitem ref list last indexLast valid index (length − 1) for controls_for: from 0, to this value, by 1. Returns 0 when list is empty.
containd_item_id_at_index_in_ref_listitem id at index in ref listRead one id from a tree/graph item id list (also accepts legacy ItemRef[]). Plug into ContaindData “… on item”.