The Calc Editor is where a field property stops holding a fixed value and starts holding an expression, allowing field input and even labels to react to other behavior on forms. Set a property to Calculation and the Calc Editor opens so you can build the logic that produces its value.
Every calculation has a return type, and that type is fixed by the property you attached it to. A boolean property needs an expression that resolves to true or false; a decimal property needs one that resolves to a number. The editor scopes what it offers you to that type throughout.
Attach a calculation to a property
Select the field on the form canvas. Its properties become available for editing.
Click the ÎŁ icon in the right rail to open the Conditions panel, which lists the properties a calculation can drive.
Set the property you want to drive to
calculationfrom its dropdown. The Calc Editor opens immediately.Read the Calc Editor's title bar. It names the field, the property, and the return type in brackets, as in
buddyName | Enabled Calculation (boolean).Drag an expression from the panel on the left onto the central canvas. An expression taking more than one input arrives as a box with a drop zone per input and a + to add more.
Drag a field from the Form Fields panel on the right onto the canvas, or into an expression's input, to feed the field's value into your expression.
Click OK. The editor closes and the property now reads
calculationwith a ÎŁ beside it. Click that ÎŁ to reopen and edit the expression.
Match your types
The value your expression produces has to match the type the property expects. A configuration whose types do not line up is rejected.
Both panels are scoped to the type you need
The expression panel on the left lists only expressions that return the type the property requires, so a boolean property is never offered an expression returning a string. Show All Expressions reveals the rest, though a mismatched type is still not accepted at the root of your expression.
The Form Fields panel on the right filters the same way, listing fields whose type matches. Turn on Show All Fields to reach a field of any other type, which is what you need when comparing a string answer inside a boolean calculation.
Which property you attach it to
Opening a field's Conditions panel with the ÎŁ icon shows six properties a calculation can drive. Two more live elsewhere: Visibility has its own panel, and Validation has its own tab.
Property | Returns | What it controls |
|---|---|---|
| the field's type | The value the field starts with. |
| the field's type | The value the field recomputes as inputs change. |
| boolean | Whether the field accepts input. |
| boolean | Whether the field is display-only. |
| the field's type | The value written when the field switches on. |
| the field's type | The value written when the field switches off. |
Initial and Update are not interchangeable
Initial runs when the field first takes a value and does not run again when the fields it reads change. A field with only an Initial calculation keeps its first result even after its inputs are answered. Update is what recalculates. Initial offers unset, constant and calculation; Update offers only unset and calculation.
Neither property is evaluated on the design canvas. The canvas shows layout, not results, so a calculated field looks blank there and a disabled field is still drawn. Use Preview, reached from the magnifier icon in the top bar, to see a calculation run.
Where to go next
Follow a tutorial
Enable a Field Based on Another Answer. Show or hide a field based on how an earlier question was answered.
Calc Editor: Branching Without Nested If Chains. Pick one of several results by matching a value, instead of stacking If inside If.
Calc Editor: Composing Multi-Level Expressions. Build and read a calculation with more than one level of nesting.
Look up an expression type
Calc Editor: Boolean Expressions. True or false logic, and where the has-value pattern for unanswered fields lives.
Calc Editor: Decimal and Integer Expressions. Numeric arithmetic, including the mixed decimal and integer casting behavior.
Calc Editor: String Expressions. Building and manipulating text.
Calc Editor: Date/Time and Duration Expressions. Date arithmetic and duration handling.
Calc Editor: User, Userid, Groupid, and Location Expressions. Identity lookups and geographic position.
Calc Editor: Array Expressions. Building or transforming a whole array, rather than reducing one to a single value.
A few expressions (If, Switch-On-Integer, Switch-On-String) appear in more than one category, since branching logic is not tied to a single return type.