Handbook · Reference · Expression nodes

Expression nodes

Where in the UI. Structure → expression library → graph canvas palette.

Palette idNameRole
literalLiteralConstant string, number, boolean, color, or datetime.
fieldRefField refReads a DataRef (item field, category property, …).
expressionRefExpression refUses another library expression. Cycles are rejected.
itemMetricRefItem metricLazy metric key.
itemVariableRefItem variableScratch key on the item.
itemHasClassRefHas classMembership test.
itemHasCategoryRefHas categoryMembership test.
itemHasElementRefHas elementMembership test.
runtimeContextRefRuntime contextHost clock, user, privacy, canvas, scheme.
currentDateTimeCurrent date/timeNow.
compareCompareeq, neq, gt, gte, lt, lte (binary node).
calculateCalculateadd, sub, mul, div.
booleanAlgebraBoolean algebraand, or, xor, nand, nor.
unaryUnarynot / negate.
ifIf / elseCondition → then / else.
elseifChainElse-if chainNested if compiled from branches.
timeBetweenTime betweenDuration between two datetimes (unit).
dateTimeSplitDate-time splitYear…second parts, local or UTC.
dateTimeMergeDate-time mergeBuild a datetime from parts.
convertQuantityConvert quantityUnit conversion; optional material and locale.
listUnitsList unitsCatalog of units as JSON text.
themeColorRefTheme colorTheme token.
colorWithAlphaColor + alphaSet opacity.
colorBrighterBrighterLighten.
colorDarkerDarkerDarken.
colorSaturateSaturateIncrease chroma.
colorDesaturateDesaturateDecrease chroma.
colorShiftHueShift hueRotate hue.
colorSplitColor splitRGB or HSL channels.
colorMergeColor mergeBuild #RRGGBB from channels.
computedRefComputed 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.