Skip to main content

Understanding the Calc Editor

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

Step-by-step
  1. Select the field on the form canvas. Its properties become available for editing.

  2. Click the ÎŁ icon in the right rail to open the Conditions panel, which lists the properties a calculation can drive.

  3. Set the property you want to drive to calculation from its dropdown. The Calc Editor opens immediately.

  4. 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).

  5. 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.

  6. 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.

  7. Click OK. The editor closes and the property now reads calculation with 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

Initial

the field's type

The value the field starts with.

Update

the field's type

The value the field recomputes as inputs change.

Enabled

boolean

Whether the field accepts input.

Readonly

boolean

Whether the field is display-only.

Reset When Enabled To

the field's type

The value written when the field switches on.

Reset When Disabled To

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

Look up an expression type

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.