Handbook · Reference · Expression nodes
Expression nodes
Where in the UI. Structure → expression library → graph canvas palette.
| Palette id | Name | Role |
|---|---|---|
literal | Literal | Constant string, number, boolean, color, or datetime. |
fieldRef | Field ref | Reads a DataRef (item field, category property, …). |
expressionRef | Expression ref | Uses another library expression. Cycles are rejected. |
itemMetricRef | Item metric | Lazy metric key. |
itemVariableRef | Item variable | Scratch key on the item. |
itemHasClassRef | Has class | Membership test. |
itemHasCategoryRef | Has category | Membership test. |
itemHasElementRef | Has element | Membership test. |
runtimeContextRef | Runtime context | Host clock, user, privacy, canvas, scheme. |
currentDateTime | Current date/time | Now. |
compare | Compare | eq, neq, gt, gte, lt, lte (binary node). |
calculate | Calculate | add, sub, mul, div. |
booleanAlgebra | Boolean algebra | and, or, xor, nand, nor. |
unary | Unary | not / negate. |
if | If / else | Condition → then / else. |
elseifChain | Else-if chain | Nested if compiled from branches. |
timeBetween | Time between | Duration between two datetimes (unit). |
dateTimeSplit | Date-time split | Year…second parts, local or UTC. |
dateTimeMerge | Date-time merge | Build a datetime from parts. |
convertQuantity | Convert quantity | Unit conversion; optional material and locale. |
listUnits | List units | Catalog of units as JSON text. |
themeColorRef | Theme color | Theme token. |
colorWithAlpha | Color + alpha | Set opacity. |
colorBrighter | Brighter | Lighten. |
colorDarker | Darker | Darken. |
colorSaturate | Saturate | Increase chroma. |
colorDesaturate | Desaturate | Decrease chroma. |
colorShiftHue | Shift hue | Rotate hue. |
colorSplit | Color split | RGB or HSL channels. |
colorMerge | Color merge | Build #RRGGBB from channels. |
computedRef | Computed ref (advanced) | Template computed id. |
Binary ops split in the palette as compare / calculate / booleanAlgebra but compile to a binary AST node. Source: app/lib/expressions/graph/graphSchema.ts.