Skip to content
npm

Expressions basics

Expressions are short formulas used across the builder: in logic properties (visibleIf, disableIf…), calculated values, validators, action conditions, and option filters.

Referencing fields

Wrap an element name in curly braces to get its current value:

text
{country}                    value of the element named "country"
{clientType} == "company"    comparison
{price} * {quantity}         math

If the referenced field is empty, the token resolves to an empty value, so use isEmpty() / notEmpty() to test for that.

Operators

KindOperators
Comparison== != > >= < <=
Logic&& (and), || (or), ! (not)
Math+ - * /
If/else in one linecondition ? valueIfTrue : valueIfFalse

Examples:

text
{age} >= 18 && {country} == "LT"
{isVip} ? {amount} * 0.9 : {amount}
!isEmpty({email}) || !isEmpty({phone})

Functions

69 built-in functions cover text, arrays, numbers, and dates:

text
isEmpty({companyCode})
contains({roles}, "admin")
{price} * {quantity}
dateDiffDays({startDate}, {endDate})

Full list with examples: Function reference.

Writing a value

An expression can also write. Put the target on the left and it becomes a write instead of a comparison:

text
{variable1} = {price} * {quantity}
{variable1} += {row.column3}

= sets the value, += adds to it. The same thing spelled out is setValue() and sumValue(). Use += from an action, since it adds again on every run. See Writing values back.

Context tokens

TokenAvailableMeaning
{fieldName}everywhereValue of a named element
row.fieldName / row.indexinside tablesCurrent row's field / index
panel.fieldName / panel.indexinside dynamic panelsCurrent entry's field / index
parentIndexnested repeatersIndex in the surrounding repeater
{__variables.name}everywhereA variable (route param, constant, computed)
{__external.name}everywhereContext provided by the host application (user, role…)
{el1[parentIndex].country}nested repeatersIndexed access into a repeater's data

Runtime state of some containers is also addressable: {myTabs.selectedTab}, {flow.selectedStepIndex}.

Boolean vs. value expressions

  • Condition properties (visibleIf, disableIf, requireIf, readonlyIf, resetIf, validator conditions, action conditions) must return true or false.
  • Value properties (expression, defaultValue) may return text, a number, a boolean, an array, or an object.

When expressions run

An expression re-evaluates automatically whenever any field it references changes. For text inputs you can tune when with Logic execution mode: on input (every keystroke), on change, or on blur (leaving the field).

Debugging

Wrap any part in dbg(value, "label"). It logs the value to the browser console and passes it through unchanged:

text
visibleIf: dbg({clientType}, "clientType") == "company"

The expression editor also shows an inline help panel with tokens, functions, and example patterns for the property you are editing.