Skip to content

Variable Reference โ€‹

How the variable namespaces fit together โ€” from registry defaults, through theme overrides, to the values a form renders at runtime. For the values themselves see Runtime Variables; for the helper functions see Code Helpers.

Namespaces โ€‹

NamespaceSourceWritablePersistence
$.self.*Auth session (user profile)NoBackend-managed
$.form.*Current form metadataNoLoaded form record
$.state.*$state() in scriptsYes โ€” scripts onlyIn-memory only (cleared on refresh)
$.variable.*Registry + active theme overrideNoBackend (registry + theme.custom/custom_dark)
$.image.*Image-type registry variablesNoBackend (registry + theme.images/images_dark)
$.fn.*()Script-type registry variablesCallableBackend registry only

Compatibility matrix โ€‹

Which namespaces resolve in which context. $.fn() entries marked โš  are allowed but read-only โ€” the function returns a value and the caller decides whether to $set or $state it.

Context$.self$.form$.state$.variable$.image{{ expr }}$.fn()
Field default valuesโœ“โœ“โœ“โœ“โœ“โ€”โ€”
Field labels / placeholdersโœ“โœ“โœ“โœ“โœ“โ€”โ€”
Option labelsโœ“โœ“โœ“โœ“โœ“โ€”โ€”
Text Display header / bodyโœ“โœ“โœ“โœ“โœ“โœ“โš 
On Load / onChange scriptsโœ“โœ“โœ“โœ“โœ“โ€”โš 
Button action scriptsโœ“โœ“โœ“โœ“โœ“โ€”โš 
Visibility scriptsโœ“โœ“โœ“โœ“โœ“โ€”โš 
Visual visibility rules (compare)โœ“โœ“โœ“โœ“โœ“โ€”โ€”
Visual validation rules (compare)โœ“โœ“โœ“โ€”โ€”โ€”โ€”

Runtime caveats โ€‹

  • $.path is for direct value lookup. {{ }} is required for helper calls or computation. Do not use a bare $get() in text.
  • Inside {{ }}: $.self, $.form, $.state, $.variable, $.image, $.fn, $get, $sum, $option, Math, etc. are available. {{ }} expressions are read-only.
  • {{ }} expressions are read-only โ€” no $set, $state writes, or $grid. Use On Load scripts for write operations.
  • {{ }} expressions only work in Text Display header and body โ€” not in field labels, defaults, or option labels.
  • $.form is form metadata. $.state is in-memory only and cleared on page refresh. Use $.variable for persistent values.
  • $.fn registry functions are read-only in every caller context. Return a value and let the caller decide whether to $set or $state it.
  • $.fn functions with no return are treated as void. Use the usage hints fn:returnable or fn:void to make intent visible in the registry UI.
  • Text-type variables only resolve $.variable.* tokens at registry level. $.self, $.form, and $.state resolve later, at form render time.
  • Theme runtime can resolve custom/custom_dark for data variables. The Data Variables override tab manages the default/light bucket; dark-specific values still resolve when present on the active theme.
  • $.image variables support light/dark overrides via theme.images and theme.images_dark. Registry defaults apply when no theme override exists.

Data-variable types โ€‹

Registry data variables are typed. The type controls how the stored value is parsed and which namespace exposes it.

TypeNamespaceParsed toUse case
string$.variablestringConfig values, display text
number$.variablenumber (if finite)Thresholds, counts, rates
boolean$.variabletrue / falseFeature flags
date$.variableISO stringReference dates
json$.variableobject / arrayStructured config
list$.variablestring[]Dropdown options, lookups
text$.variableresolved stringComposable text with $.variable.* tokens
script$.fncallable functionRegistry-owned reusable logic
image$.imagestring (URL)Theme-overridable image assets

See also: Scripts overview ยท Runtime Variables ยท Examples