Handbook · Reference · Blockly · Data

Blockly: Data

Where in the UI. Scripts tab toolbox.

Read/write item fields, categories, variables, local state, style patches.

Block idRead asPurpose
containd_read_item_fieldread item fieldcallHost(getItemData) itemField
containd_read_item_metricread item metriclazy-derived count or flag (imageCount, childCount, etc.)
containd_read_category_propertyread category propertycallHost(getItemData) categoryProperty
containd_read_item_field_on_itemread item field on itemcallHost(getItemData) with itemId — accepts numeric id or ItemRef; requires read.relatives when not bound item
containd_read_item_metric_on_itemread item metric on itemcallHost(getItemMetric) with itemId — requires read.relatives when not bound item
containd_read_category_property_on_itemread category property on itemcallHost(getItemData) with itemId — accepts numeric id or ItemRef; requires read.relatives when not bound item
containd_item_has_categoryitem has categoryTrue when categories[] on the bound item includes the category id
containd_item_has_category_on_itemitem has category on itemTrue when categories[] on the given item includes the category id — item socket accepts numeric id or ItemRef (e.g. parent_ref)
containd_category_property_has_valuecategory property has valueTrue when the bound item resolves a value (stored or static default) for the property
containd_category_property_has_value_on_itemcategory property has value on itemTrue when the given item resolves a value for the property — item socket accepts numeric id or ItemRef
containd_list_item_properties_by_typelist item properties by typecallHost(listItemPropertiesByType) on the bound item (DEC-076).
containd_list_item_properties_by_type_on_itemlist item properties by type on itemcallHost(listItemPropertiesByType) for another item (needs read.relatives).
containd_write_item_fieldwrite item fieldcallHost(setItemData)
containd_write_category_propertywrite category propertycallHost(setItemData)
containd_write_item_field_on_itemwrite item field on itemcallHost(setItemData) with itemId — accepts numeric id or ItemRef; requires write.relatives when not bound item
containd_write_category_property_on_itemwrite category property on itemcallHost(setItemData) with itemId — requires write.relatives when not bound item
containd_read_item_variableread item variableKEY is any string expression
containd_read_item_variable_on_itemread item variable on itemcallHost(getItemVariable) with itemId
containd_item_variable_existsitem variable existsTrue when the key is stored on the active item (getItemVariable type is set).
containd_item_variable_exists_on_itemitem variable exists on itemTrue when the key is stored on the given item.
containd_write_item_variablewrite item variabletypes include itemRef and list (Blockly lists round-trip as JSON arrays)
containd_write_item_variable_on_itemwrite item variable on itemcallHost(setItemVariable) with itemId — accepts numeric id or ItemRef; type list stores a Blockly list
containd_delete_item_variabledelete item variableremoves key from itemVariablesJson
containd_delete_item_variable_on_itemdelete item variable on itemcallHost(deleteItemVariable) with itemId
containd_read_local_stateread local stateephemeral session bag (DEC-061)
containd_local_state_existslocal state existsTrue when the key is present in the ephemeral session bag (getLocalState.found).
containd_write_local_statewrite local statenot persisted to the item
containd_delete_local_statedelete local statecallHost(deleteLocalState)
containd_title_style_patchtitle style patchPartial defaultTitleStyle patch — unchanged fields are not written
containd_apply_title_style_patchapply title style patchMerge patch into defaultTitleStyle on bound item (callHost getItemData/setItemData)
containd_apply_title_style_patch_on_itemapply title style patch on itemMerge patch into defaultTitleStyle on target item — requires write.relatives when not bound
containd_read_title_style_propertyread title style propertyResolved defaultTitleStyle property on bound item (defaults applied)
containd_read_title_style_property_on_itemread title style property on itemResolved defaultTitleStyle property on target item
containd_write_title_style_propertywrite title style propertyWrite one defaultTitleStyle property on bound item — type depends on the selected field
containd_write_title_style_property_on_itemwrite title style property on itemWrite one defaultTitleStyle property on target item — type depends on the selected field
containd_svg_shape_settings_patchsvg shape settings patchPartial svgShapeSettings patch — unchanged fields are not written
containd_apply_svg_shape_settings_patchapply svg shape settings patchMerge patch into svgShapeSettings on bound item (callHost getItemData/setItemData)
containd_apply_svg_shape_settings_patch_on_itemapply svg shape settings patch on itemMerge patch into svgShapeSettings on target item — requires write.relatives when not bound
containd_read_svg_shape_settings_propertyread svg shape settings propertyResolved svgShapeSettings property on bound item
containd_read_svg_shape_settings_property_on_itemread svg shape settings property on itemResolved svgShapeSettings property on target item
containd_write_svg_shape_settings_propertywrite svg shape settings propertyWrite one svgShapeSettings property on bound item — boolean
containd_write_svg_shape_settings_property_on_itemwrite svg shape settings property on itemWrite one svgShapeSettings property on target item — boolean
containd_web_share_policies_patchweb share policies patchPartial webSharePolicies patch — unchanged fields are not written (public-share policies; openOnTap / openLinksInNewTab are web-only at runtime)
containd_apply_web_share_policies_patchapply web share policies patchMerge patch into webSharePolicies on bound item (callHost getItemData/setItemData)
containd_apply_web_share_policies_patch_on_itemapply web share policies patch on itemMerge patch into webSharePolicies on target item — requires write.relatives when not bound
containd_read_web_share_policies_propertyread web share policies propertyResolved webSharePolicies property on bound item (defaults applied)
containd_read_web_share_policies_property_on_itemread web share policies property on itemResolved webSharePolicies property on target item
containd_write_web_share_policies_propertywrite web share policies propertyWrite one webSharePolicies property on bound item — boolean (public-share web only)
containd_write_web_share_policies_property_on_itemwrite web share policies property on itemWrite one webSharePolicies property on target item — boolean (public-share web only)