Lookups & rollups
Lookups and rollups are derived fields that read through a relation. They keep computed context next to your records without duplicating data.
Lookups
Section titled “Lookups”A lookup surfaces a field from a related record. On Projects related to Clients, add a lookup Account Owner that pulls the Client’s Owner — now it shows on every Project and in Project views, always current.
Add one in one click from a relation field: choose the relation, then the field to surface.
Rollups
Section titled “Rollups”A rollup aggregates the related records on the other side of a relation:
| Aggregation | Example |
|---|---|
count |
Open Tasks per Project |
sum |
Total Days across a Team Member’s Time Off |
avg |
Average deal size per Client |
min / max |
Earliest due date, largest invoice |
collect |
Every file attached to a Project’s Tasks, shown on the Project |
A count rollup needs no target field; the rest aggregate a chosen number (or date) field on the
related records.
Summing a formula (quote line totals)
Section titled “Summing a formula (quote line totals)”sum, avg, min and max can also aggregate a formula that returns a number on the related
records. The classic case: a Quote Line has a formula Line Total = {Qty} * {Price}, shown
as currency, and the Quote has a rollup Quote Total = sum of Line Total. Edit a line’s
quantity and the quote’s total follows.
Two limits, each refused when you save rather than discovered later:
- The formula must return a number. A formula that returns text, a date or a checkbox can’t be summed.
- The formula must not read a lookup. A lookup is worked out when you look at a record, not stored on it, so a rollup has nothing to add up; sum the underlying number field instead.
Once a rollup sums a formula, you can’t edit that formula into one of those two shapes without first changing or deleting the rollup.
A rollup shows the format of the field it sums
Section titled “A rollup shows the format of the field it sums”A sum, avg, min or max rollup draws its number the way the field it aggregates is drawn. A
Quote’s Quote Total that sums a Line Total in euros shows euros, and a rollup that averages
a percent field shows a percent. The format is read from the summed field each time, never copied
onto the rollup, so if you change the Line Total to dollars the Quote Total follows. A percent or
currency average is shown to at most two decimal places, in the table and on cards in a board,
gallery, list or feed.
- Set a format on the rollup to override it. An explicit
format(plain,percentorcurrency), withcurrency_codeandprecision, wins over the inherited one. - A
countrollup is always a plain whole number, and refuses a format. - Over the API, a rollup’s field config carries the inherited
format,currency_codeandprecision, plusformat_inherited: true. Sending that config back in a field update does not turn the inherited format into a stored one.
Collecting files from related records
Section titled “Collecting files from related records”A collect rollup gathers an attachment field’s files from every related record onto the
parent. Its target must be an attachment field; any other type is refused with a 422. An optional
rollup filter narrows which related records contribute, as for the other aggregations.
- It shows one chip per file, named, in the table cell and on the record page, the same as an attachment field holding those files. The chips in that cell are not clickable or downloadable, as with an attachment field’s own cell today.
- It can only be created over the API or MCP. The add-field dialog doesn’t offer
collectyet. - Only files are collected, not documents: there is no field type for a document to target.
A rollup filter is checked when you save it
Section titled “A rollup filter is checked when you save it”A rollup filter is tried against the related database when you create or change the rollup. A filter
the database cannot run is refused with a 422 that names the problem, so a broken filter is not
saved. A rollup, lookup or formula that cannot be worked out for a record shows empty instead of
stopping the rest of the table from loading.
Feeding formulas
Section titled “Feeding formulas”Both lookups and rollups are ordinary fields that formulas can reference. The classic vacation-balance recipe:
- On Team Members, add a rollup Days Used = sum of
Daysthrough the Time Off relation. - Add a formula Balance =
{Allocation} - {Days Used}.
Other favorites: event budget vs actual ({Budget} - {Spent} where Spent is a sum-rollup over
Expenses), and pipeline value per client (a sum-rollup over Opportunity Amount).