Formula Editor
Summary
- Two related surfaces for Calculated Column formulas:
- Formula Trace - Excel-style popup anchored to a cell
- Compact Expression Editor - a shortened, moveable Expression Editor
- Used to inspect how a value is derived and to edit the Expression without opening the full Wizard
The Formula Editor is the Calculated Column counterpart to the full Expression Editor.
It has two parts that work together:
- the Formula Trace popup - shows the formula for the current cell, with referenced Columns colour-matched to Grid highlights
- the Compact Expression Editor - a small, moveable and resizable editor opened from that popup
Hint
See Using Calculated Columns for the Wizard, Formula Trace options and a fuller walkthrough
Formula Trace
Formula Trace is an Excel-style popup anchored to a Calculated Column cell.
Open it by:
- Double-clicking the cell
- Selecting Show Formula in the cell's Context Menu
- Calling
calculatedColumnApi.showFormulaTrace(columnId, primaryKeyValue)
The popup shows the Column's Expression with every referenced Column in its own colour. AdapTable highlights the same data in the Grid:
- Standard Calculated Columns - referenced cells in the row are outlined and tinted
- Aggregated (and other multi-row) Calculated Columns - referenced Column headers are highlighted
Hint
For Standard Calculated Columns the popup also shows each referenced Column's name above its actual cell value for that row, followed by the computed result
Compact Expression Editor
The Formula Trace popup contains an Edit button which opens the Compact Expression Editor.
This is a shortened version of the full Expression Editor: moveable, resizable, and available without opening the Calculated Column Wizard.
It provides:
- the Functions dropdown listing available Expression Functions
- live validation — the Compact Editor shows
Valid Expressionor the error as you type - colour-coded Column references (matching the Formula Trace highlights)
- autocomplete, hover help, Quick Fixes and formatting (
Shift+Alt+F) - just as in the full Expression Editor
Edits are applied live as you type - the Calculated Column re-evaluates immediately.
Note
An invalid Expression will show #INVALID in the cells until it is corrected
Hint
Validation is the same engine as the full Expression Editor. The difference is that an invalid formula is applied immediately, so the Grid shows #INVALID until it is fixed.
The Compact Editor also provides:
- Revert - restores the Expression to how it was when the Editor was opened
- Open Full Editor - closes the Compact Editor and opens the full Calculated Column Wizard
Hint
The Compact Expression Editor is available for all 6 Calculated Column types: Standard, Aggregated, Cumulative, Quantile, Window and Observable
- This demo contains a Standard Calculated Column (
Total PRs) that addsOpen PRsandClosed PRs - After a short delay it opens Formula Trace for the first
Total PRscell
- Wait for the Formula Trace popup, or double-click any
Total PRscell - Note how the referenced cells are highlighted in matching colours
- Click Edit in the popup to open the Compact Expression Editor and change the formula - the Column updates live
Hint
- Double-click and the Show Formula Context Menu item can each be turned off - see Configuring Formula Trace
- A Calculated Column can also show its formula as a cell tooltip - see Cell Tooltip