Setup flow
Formula fields
A formula field works out each row's value from the row's other fields, the
way a spreadsheet column does: a total, a status, the days left until a
deadline.
Add one
- Open a table and press + at the end of the columns.
- Name the column and choose Formula as its type.
- Write the formula, with a field's name in braces:
{Price} * {Quantity}.
Press a field's name under the box to put it in where the cursor is, or
Show functions to see what you can use. - As you type, the line under the box says what the formula gives on the
first rows, or what's wrong and where. - Press Add.
To change a formula later, open the column's menu (press its name).
Writing a formula
- Numbers:
+ - * /and brackets, as in({Price} - {Discount}) * {Quantity}. - Text:
&joins text, as in{First name} & " " & {Last name}. Put text
in double or single quotes. - Comparisons:
= != < > <= >=give yes or no. Text is compared without
minding capitals, so{Status} = "done"matches "Done". - Dates: add or take away days, as in
{Start} + 14. One date minus
another is the days between them. - An empty field counts as 0 in a sum and as empty text when joined.
Examples
| What it shows | Formula |
|---|---|
| The total | {Price} * {Quantity} |
| With 18% tax, to the paisa | ROUND({Total} * 1.18, 2) |
| Overdue work | IF(AND(NOT({Done}), {Due} < TODAY()), "Overdue", "") |
| Days left | DATETIME_DIFF({Due}, TODAY()) |
| Working days in a stretch | WORKDAY_DIFF({Start}, {Due}) |
| A label by priority | SWITCH({Priority}, "High", "Urgent", "Low", "Later", "Normal") |
| Initials | LEFT({First name}, 1) & LEFT({Last name}, 1) |
Functions
- Logic:
IF,SWITCH,AND,OR,NOT,ISBLANK,ISERROR,BLANK,TRUE,FALSE - Numbers:
SUM,AVERAGE,MIN,MAX,ROUND,ROUNDUP,ROUNDDOWN,CEILING,FLOOR,ABS,SQRT,MOD,POWER,VALUE - Text:
CONCATENATE,LEN,UPPER,LOWER,TRIM,LEFT,RIGHT,MID,FIND,SUBSTITUTE,REPT - Dates:
TODAY,NOW,DATEADD,DATETIME_DIFF,WORKDAY_DIFF,YEAR,MONTH,DAY,WEEKDAY
They're named and written as they are in Airtable, so they'll look familiar.
One difference: DATETIME_DIFF counts days unless you give it another unit
("weeks", "months", "hours"…), where Airtable counts seconds. The editor
shows how each is written.
Good to know
- Formulas are worked out on your server each time the table opens, so
everyone sees the same values, andTODAY()is today where you are. - Renaming a field doesn't break the formulas that use it. Deleting one does:
the formula shows it as{Deleted field}and says so in every row, until
you change it. - A formula can use another formula's value, but not its own, even through
another formula. - Text a formula puts together (with
&,CONCATENATE,REPTorSUBSTITUTE) can be up to 10,000 characters; past that, the cell says so.LEFT,TRIM,UPPERand the rest work on a cell of any length. - A table can have up to 100 formula fields. A formula that takes too much
working out, such as one searching a very long cell many times over, says so
in its cells instead of slowing the table down for everyone. DATEADDkeeps to the end of a month: 31 January plus a month is
28 February.- Formula cells can't be typed in: change the formula instead. Board cards,
shared tables and guest links show their values, and the chart can add up a
formula that gives a number.
Available from OneCamp v2.68.0 (with AI) and v1.53.0 (without AI), on every
plan, the free one included.