Handbook · Reference · DataRefs
DataRef kinds
Where in the UI. Layout value source, fieldBindings, editFilter watches, action targets.
| Kind | Points at | Store | Read/write |
|---|---|---|---|
itemField | Built-in item column | Current item’s SQLite/row fields listed in Item fields. | Read/write except createdAt (read-only). |
indexedItemField | imageUris[n] | Nth gallery photo on the item. | Write replaces that slot. |
categoryProperty | Category value | Property owned by a category. Must use the owning categoryId. Optional itemFrom itemVariable to read another item. | Read/write if scriptWritable allows writes from scripts. |
computed | Computed definition | Named derived value on the template. | Read-only. |
localState | Session slot | Temporary key for the open session. | Read/write; not persisted as item data. |
runtimeContext | Host context | currentDateTime, currentUserId, privacyLevel, authState, canvasScale, canvasMode, colorScheme. | Read-only. |
itemMetric | Lazy metric | Counts and flags (children, images, graph degree, fill rates, descendant timestamps…). | Read-only. |
expression | Expression library | Evaluate another named expression. | Read-only result. |
itemVariable | Item variable | Key in itemVariablesJson. Scripts create/update keys. | Read/write via scripts and some bindings. |
themeColor | Theme token | App chrome or item-default theme colors, with auto/light/dark mode. | Read-only. |
itemHasClass | Membership | Whether the item (or ancestor) has a class. | Read-only. |
itemHasCategory | Membership | Whether the item has a category id. | Read-only. |
itemHasElement | Membership | Whether the item’s element id matches. | Read-only. |
Localized template strings are not a DataRef. Button labels, Containd text in Blockly, and chrome copy live in the translations matrix. You bind fields and properties; you translate strings. Source: containd/.../v2/types/binding.ts DataRef.