# Formula fields: syntax and examples

> Excel-style formulas computed at read time, with worked examples and the rules that keep them safe.

Help center: Records, objects & fields  
Last updated: 2026-08-01  
Web page: https://solstral.com/help/records/formula-fields-guide

A formula field calculates its value from other fields on the record using Excel-style syntax. If you can write a spreadsheet formula, you can write one here.

## How they are calculated

Formulas are evaluated **when a record is read**, not stored on it. That has a practical consequence worth understanding: a formula is never stale. Change the field it depends on and the formula's value is already correct - there is no recalculation job to wait for and no way for the stored value to drift away from the inputs.

## Worked examples

Tier a deal by size:

`IF(amount > 10000, "Large", "Standard")`

Age of a record in days:

`DATEDIF(createdAt, TODAY(), "D")`

Weighted value of a deal:

`amount * probability`

Build a display label from two fields:

`CONCAT(firstName, " ", lastName)`

Flag something needing attention, combining conditions:

`IF(AND(stage = "Proposal", DATEDIF(updatedAt, TODAY(), "D") > 14), "Stalled", "")`

## The rules

A formula may read ordinary fields on its own record, and it may read a **reference field** - a value looked up from a related record. Lookups are resolved before formulas for exactly this reason, so a formula on a Deal can use a value pulled from its Company.

A formula may *not* read another formula. This is a deliberate restriction rather than a limitation to work around: it makes a circular reference structurally impossible, so no formula can ever depend on itself through a chain of others.

## Where formulas do not appear

Because their values are computed rather than entered, formula and reference fields are read-only. They are skipped in create and edit forms, and excluded from CSV import mapping - there is nothing to import into. They do appear everywhere values are *read*: list views, filters, saved views, CSV export and reports all use the resolved value.

## Validation

A formula is checked when you save the field definition, not the first time a record happens to be read. If the syntax is wrong or it refers to a field that does not exist, the save is rejected with the reason - so a broken formula never reaches your records.

> Building something complex? Start with the simplest version that returns anything at all, check it on a real record, then add conditions one at a time. Debugging a five-condition formula written in one go is considerably harder.
