Auto-Calculated Fields That Persist
Calculated values come in two flavors: those computed on the fly when a page loads, and those calculated once and stored. Both have their place, but for many business use cases, stored calculated values are the right choice — they're queryable, filterable, sortable, and available without computation overhead every time they're needed.
Auto-calculated fields combine the convenience of automatic computation with the performance and utility of stored data.
What Gets Calculated
Auto-calculated fields use expressions defined in the field configuration. These expressions can reference other fields on the same record:
- Totals: Sum of line item amounts, total cost, running balance
- Margins: (Revenue - Cost) / Revenue, expressed as a percentage
- Scores: Weighted combination of several numeric fields
- Durations: Difference between two date fields in days or hours
- Concatenations: Combining name fields, generating reference strings
- Conditional values: Different expressions based on the value of another field
The expression evaluates using the current field values on the record.
When Calculation Runs
Calculation runs automatically when a record is saved. If any of the source fields changed, the calculated field value is recomputed and the new value is stored alongside the other fields.
This means the calculated value is always consistent with the source data. There's no drift between the displayed calculation and the underlying fields. The stored value is authoritative.
Queryable and Filterable
Because the calculated value is stored as a real field, it participates fully in queries. Filter your list to records where a calculated margin is below a threshold. Sort by a calculated score. Search for records where a derived reference number matches a pattern. Aggregate calculated values in reports.
None of this would be possible with on-the-fly computation that only runs at display time.
Handling Dependencies
When a record's fields change through an import or a lifecycle event (not just a form save), the calculated fields recalculate automatically. The trigger is any save operation, regardless of origin. The calculation is always kept current.
For collection fields (repeating rows), calculated fields on the parent record can aggregate across the collection — summing all line item totals into a grand total, for instance. Changes to any row trigger recalculation of the parent aggregate.
A Practical Example
An order record has line items in a collection, each with quantity and unit price. An auto-calculated field on each line item stores the line total (quantity × unit price). An auto-calculated field on the order stores the order total (sum of all line totals). Both values update automatically whenever any quantity or price changes.
The order total is a real stored value — filter "orders over $10,000," sort by total descending, export for reporting. It works exactly like any other field, because it is one.