Handbook · Reference · Blockly · Tree
Blockly: Tree
Where in the UI. Scripts tab toolbox.
Walk the item tree: roots, parent, children, placeholders, ids.
| Block id | Read as | Purpose |
|---|---|---|
containd_list_root_item_refs | list root item refs | callHost(listRootItemRefs) → number[] of top-level location root ids |
containd_get_root_item_ref | get root item ref | callHost(getRootItemRef) → item id (0 if missing); use 0 for the bound item |
containd_get_parent_item_ref | get parent item ref | callHost(getParentItemRef) → parent item id (0 if none); use 0 for bound item |
containd_list_child_item_refs | list child item refs | callHost(listChildItemRefs) → number[] of direct child ids; use 0 for bound item |
containd_list_sibling_item_refs | list sibling item refs | callHost(listSiblingItemRefs) → number[] same parent excluding self; use 0 for bound item |
containd_item_exists | item exists | true when the item row exists; use 0 for bound item |
containd_item_is_placeholder | item is placeholder | true when originalId > 0; use 0 for bound item |
containd_get_original_item_ref | get original item ref | callHost(getOriginalItemRef) → original item id for a placeholder (0 if not a placeholder / missing); use 0 for bound item |
containd_list_placeholder_item_refs | list placeholder item refs | callHost(listPlaceholderItemRefs) → number[] of placeholders for the canonical original; use 0 for bound item |
containd_get_item_ref_by_uuid | get item ref by uuid | callHost(getItemRefByUuid) → item id for collectionShareId UUID (0 when not found) |
containd_get_item_uuid | get item uuid | collectionShareId for the item (mints if missing); use 0 for bound item |
containd_ensure_internal_product_code | ensure internal product code | fill internalProductCode if empty (same as label create); no-op if already set; use 0 for bound item |
containd_item_ref_list_length | item ref list length | Array length for child/sibling/graph/placeholder/root item id lists |
containd_item_ref_list_last_index | item ref list last index | Last 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_list | item id at index in ref list | Read one id from a tree/graph item id list (also accepts legacy ItemRef[]). Plug into ContaindData “… on item”. |
containd_item_id_from_item_ref | item id from item ref | Usually unnecessary — tree/graph lists already return numbers. Compat: coerces a legacy ItemRef or bare number via __resolveItemId. |
containd_bound_item_id | bound item id | Numeric id of the script bound item (onCreate / action handler context) |
containd_item_is_root | item is root | True when the item has no parent; use 0 for the bound item |