Skip to content

Variables

Variables are named values defined once (in the Variables tab) and readable from every expression as {__variables.name} — or just {name} when it doesn't clash with an element name.

Variable types

The Type column decides where the value comes from:

TypeValue comes fromExample
routethe URL — route.id, route.params.id, route.queryParams.xxx, route.data.xxx, route.url/clients/42/editclientId = 42
externalcontext the host application provides via APIexternal.apiBaseUrl, external.user, external.features.list
constanta fixed value you typemaxUploadMb = 10
expressioncomputed from other dataisEditMode = notEmpty({__variables.route.id})
dataSourcethe result of a data sourcesettings loaded from the API
manualset at runtime by a Set value action or host code — never recalculated automaticallywizard state, selected row

Definition fields

Each row in the Variables tab has:

FieldWhat it does
NameIdentifier used in expressions: {__variables.name}.
TitleHuman label for the list.
TypeOne of the types above.
Value / SourceThe route path, external path, constant, expression, or data source name — depending on type.
FallbackUsed when the source resolves to nothing (e.g. no route param on /clients/new).
Target pathAlso write the value into the form data at this path.
To data JSONShip the value with the submitted data.
Reload data source when fields changeFor dataSource variables: re-run the source when watched fields change.
Listen fieldsComma-separated paths that trigger the reload — reload runs only when one of these changes. Example: userId, data.user.type, filters.status.
RefreshManually re-resolve variables after structure or source changes.

Using variables

text
visibleIf:      {__variables.route.mode} != "view"
Default value:  {__variables.route.clientId}
disableIf:      {__external.userRole} != "admin"
Data source param:  id = {__variables.route.clientId}
Navigate to:    /clients/{__variables.route.clientId}/history

{__external.*} is a shortcut to everything the host application passed as external context — no definition needed.

Example — edit vs. create mode

The same form serves /clients/new and /clients/42/edit:

  1. Variable clientId — source route, fallback empty.
  2. Variable isEdit — source expression: notEmpty({__variables.clientId}).
  3. Load panel data with source GET /api/clients/{id}, param id = {__variables.clientId} (skipped automatically when empty — nothing loads in create mode).
  4. Page title element: dynamic text {{isEdit ? "Edit client" : "New client"}}.
  5. Save button condition: {__variables.isEdit}PUT action; otherwise POST action (two actions with opposite conditions).