Calculations & expressions
Calculated fields evaluate JavaScript expressions stored in calculate. Field values are
available as $field_name variables.
Quick example
Code
Builtins by category
Logical
Math
Date
String
Choice
Schema
Control
Repeatable collections
REPEATABLEVALUES($tasks, 'cost') and REPEATABLESUM($tasks, 'cost') are calculation-only builtins
requiring createRecordEvaluator() record-tree context. In an ordinary engine, without that
context, they report a diagnostic. Events can read an accessible aggregate CalculatedField result,
but cannot call these builtins themselves.
Use the RepeatableSection data_name and a literal target data_name owned by its rows. Ordinary Sections do not add a record scope. Dynamic names, aliases and calls inside EVAL are unsupported. The flat RepeatableSection placeholder is null.
| Row values | REPEATABLEVALUES | REPEATABLESUM |
|---|---|---|
| Numeric 100, empty, 200 | [100, null, 200] | 300 |
| No rows | [] | 0 |
| Single Red, empty, Other Teal | ['red', null, 'Teal'] | Unsupported target |
| Multiple Red/Blue, empty | [['red', 'blue'], []] | Unsupported target |
| Linked records | [[{record_id:'R1'}], [{record_id:'R2'}]] | Unsupported target |
Sums accept only NumericField/CalculatedField finite numeric values, skip missing entries and reject
strings, non-finite values and overflow. Choice codes remain strings, including '100'; convert them
explicitly in a row calculation before summing. Malformed/ambiguous choices cause a calculation
failure, not silent selection or filtering. Multiple selections preserve row grouping and predefined
selection order followed by Other text. Links expose references only; no content is fetched.
Other value targets are TextField, BooleanField, DateField and TimeField. Calculated arrays/objects retain their types and grouping. Containers, LabelField, media, StatusField and TitleField are not targets. Rows keep their accepted order, and hidden rows are included. Diagnostics do not affect submission validity.