Formula Reference

Complete reference for all formula functions available in database columns. Use prop("Name") to access any property value.

Operators

+ - * / % Arithmetic== != > < >= <= Comparison&& || Logical

Functions

69 functions
prop(name)
logic

Get property value by name

prop("Property Name")
prop("Status")→"Done"
prop("Amount")→150
prop("Created time")→"2025-03-01T12:00:00Z"

Works with all property types including Created time, Last edited time, Created by, Last edited by.

if(condition, then, else)
logic

Conditional expression

if(condition, thenValue, elseValue)
if(prop("Status") == "Done", "✓", "✗")→"✓"
if(prop("Score") > 50, "Pass", "Fail")→"Pass"
ifs(cond1, val1, ..., default?)
logic

Multiple conditions (like switch)

ifs(cond1, val1, cond2, val2, ..., default?)
ifs(prop("Score") >= 90, "A", prop("Score") >= 80, "B", prop("Score") >= 70, "C", "F")→"A"

If the last argument has no condition pair, it acts as the default value.

not(value)
logic

Logical negation

not(value)
not(prop("Done"))→true
empty(value)
logic

Check if value is empty or null

empty(value)
empty(prop("Email"))→true
empty("hello")→false
coalesce(...values)
logic

Returns first non-empty value

coalesce(val1, val2, ...)
coalesce(prop("Nickname"), prop("Name"), "Anonymous")→"John"
contains(text, search)
text

Check if text contains substring

contains(text, search)
contains("hello world", "world")→true
startsWith(text, search)
text

Check if text starts with substring

startsWith(text, search)
startsWith("hello", "hel")→true
endsWith(text, search)
text

Check if text ends with substring

endsWith(text, search)
endsWith("hello", "llo")→true
concat(...values)
text

Concatenate values into a string

concat(val1, val2, ...)
concat(prop("First"), " ", prop("Last"))→"John Doe"
join(...values, separator)
text

Join non-empty values with separator

join(val1, val2, ..., separator)
join(prop("City"), prop("Country"), ", ")→"Berlin, Germany"

Empty values are automatically filtered out before joining.

length(text)
text

String length

length(text)
length("hello")→5
lower(text)
text

Convert to lowercase

lower(text)
lower("HELLO")→"hello"
upper(text)
text

Convert to uppercase

upper(text)
upper("hello")→"HELLO"
trim(text)
text

Remove leading/trailing whitespace

trim(text)
trim(" hello ")→"hello"
replace(text, search, replace)
text

Replace first occurrence

replace(text, search, replacement)
replace("hello world", "world", "there")→"hello there"
slice(text, start, end?)
text

Substring by index

slice(text, start, end?)
slice("hello", 0, 3)→"hel"
left(text, count)
text

First N characters

left(text, count)
left("hello", 2)→"he"
right(text, count)
text

Last N characters

right(text, count)
right("hello", 3)→"llo"
repeat(text, count)
text

Repeat text N times

repeat(text, count)
repeat("ab", 3)→"ababab"
padStart(text, length, fill?)
text

Pad start of string

padStart(text, targetLength, fillChar?)
padStart("5", 3, "0")→"005"
padEnd(text, length, fill?)
text

Pad end of string

padEnd(text, targetLength, fillChar?)
padEnd("hi", 5, ".")→"hi..."
split(text, separator, index?)
text

Split text and get part

split(text, separator, index?)
split("a-b-c", "-", 1)→"b"

Index defaults to 0 (first part).

test(text, regex)
text

Test regex match

test(text, regexPattern)
test("abc123", "[0-9]+")→true
abs(number)
math

Absolute value

abs(number)
abs(-5)→5
round(number)
math

Round to nearest integer

round(number)
round(3.7)→4
floor(number)
math

Round down

floor(number)
floor(3.9)→3
ceil(number)
math

Round up

ceil(number)
ceil(3.1)→4
min(...numbers)
math

Minimum value

min(a, b, ...)
min(5, 3, 8)→3
max(...numbers)
math

Maximum value

max(a, b, ...)
max(5, 3, 8)→8
pow(base, exp)
math

Exponentiation

pow(base, exponent)
pow(2, 3)→8
sqrt(number)
math

Square root

sqrt(number)
sqrt(16)→4
sign(number)
math

Sign of number

sign(number)
sign(-10)→-1
sign(0)→0
sign(5)→1
log(number)
math

Natural logarithm

log(number)
log(1)→0
log10(number)
math

Base-10 logarithm

log10(number)
log10(100)→2
log2(number)
math

Base-2 logarithm

log2(number)
log2(8)→3
toNumber(value)
convert

Convert to number

toNumber(value)
toNumber("42")→42
toString(value)
convert

Convert to string

toString(value)
toString(42)→"42"
format(number, decimals)
convert

Format number with decimals

format(number, decimals)
format(3.14159, 2)→"3.14"
toFixed(number, decimals?)
convert

Number to fixed decimal string

toFixed(number, decimals?)
toFixed(3.1, 3)→"3.100"
now()
date

Current date and time

now()
now()→"2025-03-03T12:00:00.000Z"
today()
date

Today's date

today()
today()→"2025-03-03"
year(date)
date

Extract year

year(date)
year(now())→2025
month(date)
date

Extract month (1-12)

month(date)
month(now())→3
day(date)
date

Extract day of month

day(date)
day(now())→3
hour(date)
date

Extract hour (0-23)

hour(date)
hour(now())→12
minute(date)
date

Extract minute (0-59)

minute(date)
minute(now())→30
dateBetween(date1, date2, unit)
date

Numeric difference between two dates

dateBetween(date1, date2, unit)
dateBetween(now(), prop("Created time"), "days")→45
dateBetween(prop("End"), prop("Start"), "hours")→72
dateBetween(now(), prop("Status changed"), "workdays")→5

Units: "days", "workdays" (Mon to Fri only, excludes weekends), "hours", "minutes", "seconds", "months", "years". Returns date1 - date2. Aliases for workdays: "workday", "businessDays", "business_days".

duration(date1, date2, style?)
date

Human-readable duration between dates

duration(date1, date2, style?)
duration(prop("Created time"), now())→"3 days 5 hours"
duration(prop("Created time"), now(), "short")→"3d 5h"

Style: "long" (default) gives "3 days 5 hours 10 minutes", "short" gives "3d 5h 10m".

formatDuration(minutes, style?)
date

Format minutes as readable duration

formatDuration(totalMinutes, style?)
formatDuration(90)→"1 hour 30 minutes"
formatDuration(1500, "short")→"1d 1h 0m"

Accepts a number of minutes. Style: "long" (default) or "short".

dateAdd(date, amount, unit)
date

Add to a date

dateAdd(date, amount, unit)
dateAdd(now(), 7, "days")→"2025-03-10T12:00:00Z"
dateAdd(prop("Start"), 5, "workdays")→"2025-03-10T12:00:00Z"

Units: "days", "workdays" (skips Sat/Sun), "months", "years", "hours", "minutes", "seconds". Negative amounts go backwards.

dateSubtract(date, amount, unit)
date

Subtract from a date

dateSubtract(date, amount, unit)
dateSubtract(now(), 1, "months")→"2025-02-03T12:00:00Z"
dateBefore(date1, date2)
date

True if date1 is before date2

dateBefore(date1, date2)
dateBefore(now(), prop("Due Date"))→true
dateAfter(date1, date2)
date

True if date1 is after date2

dateAfter(date1, date2)
dateAfter(now(), prop("Start"))→true
dateEqual(date1, date2)
date

True if same calendar day

dateEqual(date1, date2)
dateEqual(now(), today())→true
formatDate(date, format?)
date

Format date with pattern

formatDate(date, format?)
formatDate(now(), "DD.MM.YYYY")→"03.03.2025"
formatDate(now(), "YYYY-MM-DD HH:mm")→"2025-03-03 12:30"

Tokens: YYYY, MM, DD, HH, mm. Default format: "YYYY-MM-DD".

relProp(relation, field)
relation

Field value from first related page

relProp("Relation Name", "Field Name")
relProp("Company", "Revenue")→1000000
relCount(relation, field?)
relation

Count of related records

relCount("Relation Name", field?)
relCount("Tasks")→12
relSum(relation, field)
relation

Sum numeric field across relations

relSum("Relation Name", "Field Name")
relSum("Items", "Price")→450
relAny(relation, field)
relation

True if any related value is truthy

relAny("Relation Name", "Field Name")
relAny("Tasks", "Done")→true
relAll(relation, field)
relation

True if all related values are truthy

relAll("Relation Name", "Field Name")
relAll("Tasks", "Done")→false
prop(lookup)
lookup

A lookup collapses to a scalar: its single value, or the first of many

prop("Lookup Column")
prop("New PPS (local)") * prop("FX Rate Value")→541.21675

A lookup pulling a single value (relation limited to 1) reads directly as a number, so you can do arithmetic with it. Use first/sum/min/max/average to control multi-value lookups.

first(lookup)
lookup

First value of a lookup

first(prop("Lookup Column"))
first(prop("FX Rate Value"))→1.175
last(lookup)
lookup

Last value of a lookup

last(prop("Lookup Column"))
last(prop("Quarterly Rates"))→1.21
sum(lookup)
lookup

Sum of a lookup's values

sum(prop("Lookup Column"))
sum(prop("Line Item Totals"))→4500
average(lookup)
lookup

Average of a lookup's values

average(prop("Lookup Column"))
average(prop("Quarterly Rates"))→1.19
count(lookup)
lookup

Count of non-empty lookup values

count(prop("Lookup Column"))
count(prop("Line Item Totals"))→3
min(lookup)
lookup

Smallest value of a lookup

min(prop("Lookup Column"))
min(prop("Quarterly Rates"))→1.17
max(lookup)
lookup

Largest value of a lookup

max(prop("Lookup Column"))
max(prop("Quarterly Rates"))→1.21

Last updated August 26, 2026

Formula Reference · Team Brain