A calculation with one expression inside another is a tree. Most examples in this help center are two levels deep, an And holding a Has-Value and an Equals. Real Enabled and Validation logic goes deeper, and past two levels the builder stops showing you the whole thing at once.
This page covers how to add a level, how to read a tree someone else built, and which of the Calc Editor's three views to use for each.
The three views
The Calc Editor's title bar carries three icons. They are the same expression shown three ways.
View | Icon | Use it to |
|---|---|---|
Canvas | checkmark | Build. Drag expressions and fields into place. |
Outline | grid | Read. One line per level, collapsed by default. |
Code | angle brackets | Read or edit the expression as JSON. |
The canvas is the only view that accepts a drag, and it is the one that runs out of room first. A three-level expression is already wider than the canvas, and the terms past the right edge cannot be reached by scrolling the page. Switch to the outline view to see them.
Adding a level
The step that is easy to miss is the first one.
Click the operand you want to fill. It highlights.
The Form Fields panel rescopes to that operand's type, and the expression panel's heading changes to match. An operand expecting a boolean offers boolean expressions; one expecting an integer offers integer fields.
Drag the expression or field onto the highlighted operand.
Dropping onto an unselected operand does nothing
There is no error and no movement. Select the operand first. This is the most common reason a drag appears not to work.
To add a term to an expression that takes a variable number of them, such as And or Or, use Add An Optional Parameter at the bottom of its block.
Reading a tree in the outline view
The outline view prints the root expression, then its terms in order, with a chevron on any term that contains another expression. Terms that are plain field references print their field name. Terms that are expressions print the expression name and how many values it holds.
So a root and with three terms reads as a single line, and expanding the third gives it its own line underneath.
Read the root first and take its terms on trust. The root tells you whether the calculation is an "all of these" (
And), an "any of these" (Or), or a choice (If,Switch-On-String). That is usually enough to know whether you are even looking at the right calculation.Expand one branch at a time, and collapse it before opening the next.
Why the type of each slot matters
Each operand declares the type it expects, printed in grey on the right of its own block. A string expression will not go where a boolean belongs. Where the types are close, the builder converts rather than refusing.
A decimal Product says as much on its own drop targets: Drag and Drop Decimal or Integer Expressions/Form Fields Here. Drop an integer field into one and the builder promotes it by multiplying by one, so the block becomes product-integer holding your field and a constant of 1. Nothing is wrong. The recording above shows it happening.
Where that promotion lands depends on what else is in the expression. Dropped into an otherwise empty Product it becomes the whole expression. Dropped into a Product whose other term is already filled it sits as a nested term inside it. See Calc Editor: Decimal and Integer Expressions.
Expression names in the picker and in the code view
The picker shows one generic entry where the code view shows a type-specific key. Equals becomes equals-string once its operands are strings. Greater-Than becomes greater-than-integer or greater-than-decimal.
This matters only when reading the code view or comparing notes with someone quoting JSON. In the canvas and outline views the block relabels itself as its operands are filled, so you can watch the generic name resolve into the specific one.
Removing a term
Selecting a term inside a multi-term expression reveals a delete control beneath it, which removes that term and leaves the rest of the tree alone. The trash target in the lower right of the canvas discards a whole block.
Replace Σ Here! is not how you change one term
The drop target beside the root swaps the entire root expression and keeps nothing beneath it.
If you lose your place
Close the Calc Editor with CANCEL. The calculation reverts to whatever it was when you opened it, so an experiment that got away from you costs nothing. Cancel reverts the expression only. A property you changed on the way in, such as switching Enabled from true to calculation, stays changed.