Access Baserow’s complete formula function library and learn common formula patterns for calculations, text manipulation, date operations, and logical conditions.
This reference guide helps you build powerful formulas in Baserow. For a general introduction to formulas, see the Formula field overview.
Baserow formulas support multiple field types, including Duration fields and Multiple select fields. You can perform mathematical operations, text manipulation, date calculations, and logical comparisons across your data.
The formula editor in Baserow includes built-in autocomplete and function suggestions. As you type, relevant functions appear with syntax hints and examples.
To explore available functions:
Formulas work with Multiple select fields to check which options are selected and perform operations on that data.

When working with Link-to-table fields, use lookup() to access fields from linked records, then apply aggregation functions like sum(), count(), or join().
Lookup fields and Rollup fields return arrays. Convert them to single values using aggregation functions before using them in conditions or comparisons.
These examples demonstrate frequently used formula patterns. Replace field names with your own table fields.
Calculate total price:
field('Quantity') * field('Unit Price')
Apply percentage discount:
field('Price') * (1 - field('Discount Percent') / 100)
Round to 2 decimal places:
round(field('Amount'), 2)
Find the greater value:
greatest(field('Value A'), field('Value B'))
Combine first and last name:
concat(field('First Name'), ' ', field('Last Name'))
Convert to uppercase:
upper(field('Product Code'))
Extract first 10 characters:
left(field('Description'), 10)
Check if text contains a word:
contains(field('Notes'), 'urgent')
Calculate days between dates:
date_diff('day', field('Start Date'), field('End Date'))
Format date as text:
datetime_format(field('Created'), 'YYYY-MM-DD')
Check if date is in the past:
field('Due Date') < today()
Get the year from a date:
year(field('Date Field'))
Display different text based on status:
if(field('Status') = 'Complete', '✓ Done', '⧗ Pending')
Use default value when field is empty:
when_empty(field('Notes'), 'No notes added')
Combine multiple conditions:
if(and(field('Quantity') > 0, field('Price') > 100), 'In Stock - Premium', 'Standard')
Sum values from linked records:
sum(lookup('Orders', 'Total'))
Count linked items:
count(field('Related Items'))
Join text from multiple records:
join(lookup('Projects', 'Name'), ', ')
Filter and sum:
sum(filter(lookup('Items', 'Price'), lookup('Items', 'Status') = 'Active'))
Create a clickable button:
button('https://example.com/' + field('ID'), 'View Details')
Link to email address:
link('mailto:' + field('Email'))

Use the field() function with the exact field name in single quotes: field('Field Name'). Field names are case-sensitive and must match exactly.
Lookup and Link-to-table fields contain arrays (multiple values), not single values. Most functions expect single values. Use aggregation functions like sum(), join(), count(), or avg() to convert arrays into single values.
Example problem:
isblank(field('Organization')) // Won't work if Organization is a link field
Solution:
isblank(join(field('Organization'), '')) // Converts array to text first
Yes. Duration fields support mathematical operations directly. You can add, subtract, multiply, and divide duration values just like numbers. Learn more about Duration fields.
Use datetime_format() with the ‘D’ format code, where Sunday = 1, Monday = 2, etc:
datetime_format(field('Date Field'), 'D') = '1' // Returns true if Sunday
For more date formatting options, see the PostgreSQL formatting documentation.
Yes. Both functions update every 10 minutes. Use today() for the current date only, and now() when you need both date and time.
Use when_empty() to provide fallback values, or isblank() to check if a field is empty:
when_empty(field('Optional Field'), 'Default Value')
if(isblank(field('Name')), 'No name provided', field('Name'))
Yes. Use regex_replace() to find and replace text patterns:
regex_replace(field('Phone'), '[^0-9]', '') // Removes non-numeric characters
Still need help? If you’re looking for something else, please feel free to make recommendations or ask us questions; we’re ready to assist you.