form
form, tile type
The form tile is intended to display a form where values can be manually entered from the dashboard view. The variables listed for display in this tile are expected to be attached scalar values obtained from a read form.
read form with
StartDate : date
IsTicked : boolean
Category : text
MyHidden : text
show form "My settings" a1b4 with
StartDate as "My start date"
IsTicked as "Is ticked"
Category as "My category"
MyHidden { formAccess: hidden }
show summary "My settings view" c1d4 with
StartDate
IsTicked
Category
MyHidden
Form values come from dashboard submissions. Runs from the IDE or RunFlow replay the last submission unless overridden there. The last submission is not a programmatic state.
Form values are scalars and persist across runs. A default expression in
read form supplies the value when the submitted field is missing or empty.
Without an explicit default, primitive fields use their type default (for
example 0 for number).
The form namespace can be used to access raw values, but it is not a table.
read form with
n : number
k = n + 1
show scalar "My counter" with k
Binding form values
show form can display arbitrary scalar expressions as long as they are bound to a form field via form:"name".
read form with
n : number
k = n + 1
show form "Click 'Start run' to increase this counter" a1d2 with
k form:"n"
Mutable form entries
show form entries can be bound to dash-mutable variables with the mutable
annotation. Edits made in the dashboard update the mutable variable and refresh
dash expressions that depend on it.
read form with
IsActive : boolean
mutable Active = IsActive
dash Status = if Active then "enabled" else "disabled"
show form "Settings" a1b2 with
Active mutable form:"IsActive"
show scalar "Status" c1d2 with Status
A mutable variable must appear as mutable exactly once. If a
mutable variable is never used with the mutable annotation, or if the same
mutable variable is bound to several form entries, compilation fails.
Compile-time access
Form values are available at compile time and can be used to build paths in read statements.
read form with
folder : text
read "/\{folder}/orders.tsv" as T max 1m with
Quantity : number
show scalar "Total" with sum(T.Quantity)
Enum fields and defaults
read form accepts script-defined enum types. The submitted text
is interpreted as an enum label. Enums populated from data cannot be used as
form input types.
A default expression must be a compile-time constant of the field’s type.
For an enum field, a text label is also accepted and converted to that enum.
table enum Policy = "Standard", "Priority"
read form with
policy : enum Policy default "Standard"
horizon : number default 30
startDate : date default date(2026, 1, 1)
includeBackorders : boolean default true
show form "Planning settings" a1d4 with
policy as "Policy"
horizon as "Horizon (days)"
startDate as "Start date"
includeBackorders as "Include backorders"
With no previous submission, these fields contain Standard, 30,
2026-01-01, and true. A non-empty submitted value takes precedence over
the declared default. An enum field without a default needs a submitted label,
unless its enum includes the empty label "".
These defaults apply when reading the form. An expression displayed through
show form with form:"name" instead controls the value offered for the next
submission; it does not change the value already read for the current run.
StyleCode
For generic StyleCode rules, see stylecode.