Formulas
A formula property calculates its value for every page from the page’s other properties: a number of days left, a total price, a label made of several fields, a flag that turns on when a task is late. Formulas are recalculated whenever the page or a related page changes; you never type into them.
Venolio formulas follow the style of Notion formulas (version 2), so most Notion formulas work as they are. Not every Notion function exists; the full list is below.
Create a formula
- Add a property (see Properties) with the type Formula.
- Type the expression in the Formula field, for example
prop("Price") * prop("Quantity"). - Click Save.
The value appears in every page at once. When a formula cannot be calculated for a page, its cell shows Formula error (hover it to read the reason), and the record page shows Calculation error. Other pages are not affected.
prop("Price") * prop("Quantity")
if(prop("Done"), "✅", "⏳")
dateBetween(prop("Due"), now(), "days")
prop("Tags").map(current.upper()).join(", ")
Refer to properties
prop("Name of property") reads a property of the same page. You can also use the property’s ID.
prop("Name") or prop("title") gives the page name (unless you have a property called Name).
What prop() returns depends on the property type:
| Property type | In a formula |
|---|---|
| Text, URL, Email, Phone | Text |
| Number | Number |
| Checkbox | true or false |
| Select, Status | The option’s label as text |
| Multi-select | A list of option labels |
| Date, Created time, Last edited time | A date (a range keeps its end) |
| Person, Created by, Last edited by | A list of people |
| Relation | A list of pages |
| ID | The number, or the text with its prefix such as TASK-57 |
| Formula | That formula’s result |
| Rollup | The rollup’s result |
An empty property gives null. If you rename a property, change its name in formulas that use it.
Syntax
- Numbers:
42,3.5,.5,1e3. - Text: in double or single quotes,
"Done"or'Done'. Inside,\nis a new line,\ta tab, and a backslash escapes a quote:"say \"hi\"". - True, false, empty:
true,false,null. - Lists:
[1, 2, 3],["a", "b"]. - Functions:
round(prop("Price"), 2). - Methods: every function can also be written after its first argument, so
prop("Title").upper()is the same asupper(prop("Title")), and calls can be chained:prop("Tags").map(current.lower()).join(", "). - Brackets:
(a + b) * c. - Spaces and line breaks between parts are ignored.
Operators
From lowest to highest precedence:
| Operator | Meaning |
|---|---|
or, || |
Either side is true |
and, && |
Both sides are true |
==, != |
Equal, not equal |
>, <, >=, <= |
Comparisons of two numbers, two texts or two dates |
+, - |
Add, subtract; + joins text when either side is text |
*, /, % |
Multiply, divide, remainder |
not, !, - before a value |
Not, negative |
and and or stop as soon as the result is known. There is no ^ operator: use pow(a, b).
Comparing values of different kinds, for example a number with text, is an error. Equality
compares dates by the moment they stand for, and people and pages by who or which page they are.
True and false
Where a condition is expected, these count as false: false, null, 0, empty text "" and an
empty list []. Everything else is true.
Functions
Every function below can be called as name(a, b) or as a method a.name(b).
Logic
| Function | Result |
|---|---|
if(condition, then, else) |
then when the condition is true, else else. Only the chosen branch is calculated. |
ifs(c1, v1, c2, v2, …, else) |
The value after the first true condition, or the last value. |
and(a, b, …), or(a, b, …) |
All true, any true (two or more values). |
not(a) |
The opposite of a. |
empty(a) |
True for null, false, 0, "" and []. |
equal(a, b), unequal(a, b) |
The same as == and !=. |
larger(a, b), largerEq(a, b), smaller(a, b), smallerEq(a, b) |
The same as >, >=, <, <=. |
Variables
| Function | Result |
|---|---|
let(name, value, expression) |
Calculates expression with name standing for value. |
lets(name1, value1, name2, value2, …, expression) |
Several variables; each can use the ones before it. |
let(total, prop("Price") * prop("Quantity"), if(total > 1000, total * 0.9, total))
lets(net, prop("Amount"), vat, net * 0.2, net + vat)
current and index are reserved for list functions and cannot be variable names.
Numbers
| Function | Result |
|---|---|
add(a, b), subtract(a, b), multiply(a, b), divide(a, b) |
The same as +, -, *, /. add of two texts joins them. |
mod(a, b) |
The remainder of a / b. |
pow(a, b) |
a to the power of b. |
round(n), round(n, places) |
Rounded to a whole number, or to places decimals (−12 to 12). |
ceil(n), floor(n) |
Rounded up, rounded down. |
abs(n) |
Without its sign. |
sign(n) |
−1, 0 or 1. |
sqrt(n), cbrt(n) |
Square root, cube root. |
exp(n) |
e to the power of n. |
ln(n), log10(n), log(n, base) |
Natural logarithm, base 10, any base. |
pi(), e() |
The constants π and e. |
min(…), max(…), sum(…), mean(…), median(…) |
Over several numbers or one list. Empty values are skipped. sum of nothing is 0; the others are empty. |
toNumber(a) |
Text such as "12.5" as a number; true is 1, false and null are 0. |
Dividing by zero, a logarithm of zero or a negative number, and any result that is not a finite number are errors.
Text
| Function | Result |
|---|---|
format(a), text(a) |
Any value as text. People give their name, pages their title, dates their ISO form. |
length(a) |
The number of characters, or of items in a list. |
concat(a, b, …) |
Joins texts, or joins lists into one list when every argument is a list. |
lower(t), upper(t) |
Lower case, upper case. |
trim(t) |
Without spaces at the start and end. |
substring(t, start, end), slice(t, start, end) |
Part of the text from start up to (not including) end; without end, to the end. Counting starts at 0; negative positions count from the end. |
contains(t, part), includes(t, part) |
Whether the text contains part (case matters). |
startsWith(t, part), endsWith(t, part) |
Whether the text starts or ends with part. |
split(t, separator) |
A list of the pieces between separators. |
join(list, separator) |
The items of a list as one text. |
repeat(t, n) |
The text n times. |
test(t, pattern) |
Whether a regular expression matches. |
match(t, pattern) |
A list of all matches of a regular expression. |
replace(t, pattern, with) |
Replaces the first match. $1, $2 insert captured groups. |
replaceAll(t, pattern, with) |
Replaces every match. |
Regular expressions use the common syntax (\d, [a-z], (…), +, *, ?, |, ^, $).
Look-around and back-references are not supported. Inside quotes, write a backslash twice:
test(prop("Code"), "^\\d{4}$").
Styled text
| Function | Result |
|---|---|
style(t, style1, style2, …) |
The text with styles: "b" bold, "i" italic, "u" underline, "s" strikethrough, "c" code, a colour ("gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", "red") or a background ("red_background" and so on). |
unstyle(t), unstyle(t, style, …) |
Removes all styles, or only the ones named. |
if(prop("Overdue"), style("Late", "b", "red"), "On time")
Lists
| Function | Result |
|---|---|
at(list, i) |
The item at position i (from 0; −1 is the last). |
first(list), last(list) |
The first or last item. |
slice(list, start, end) |
Part of the list, like substring for text. |
contains(list, value), includes(list, value) |
Whether the list contains the value. |
length(list) |
The number of items. |
reverse(list) |
The items in reverse order. |
sort(list) |
Sorted values. |
sort(list, key) |
Sorted by an expression of current, for example sort(prop("Tasks"), current.prop("Due")). Keys must all be numbers, all texts, all dates or all true/false; empty keys go last. Equal keys keep their order. |
unique(list) |
Without repeated values. |
flat(list) |
Lists inside the list become part of it (one level). |
concat(list1, list2, …) |
One list. |
join(list, separator) |
One text. |
map(list, expression) |
A new list with the expression calculated for each item. |
filter(list, condition) |
The items for which the condition is true. |
find(list, condition) |
The first item for which the condition is true, or empty. |
findIndex(list, condition) |
The position of that item, or −1. |
some(list, condition), every(list, condition) |
Whether any item, or every item, meets the condition. |
min, max, sum, mean, median |
Over a list of numbers (see Numbers). |
Inside map, filter, find, findIndex, some, every and sort, current is the item and
index its position (from 0). In nested list functions, each level has its own current.
prop("Scores").filter(current >= 50).length()
prop("Tags").some(current == "Urgent")
[1, 2, 3].map(current * index)
Dates
| Function | Result |
|---|---|
now() |
The current date and time. |
today() |
Today’s date. |
parseDate(t) |
A date from ISO text such as "2026-03-31" or "2026-03-31T14:00:00+01:00". |
dateAdd(date, n, unit), dateSubtract(date, n, unit) |
The date moved forward or back by n units. |
dateBetween(a, b, unit) |
How many whole units a is after b (negative if before). |
dateRange(start, end) |
A date range. The end must not be before the start. |
dateStart(d), dateEnd(d) |
The start or end of a range (dateEnd of a single date is that date). |
year(d), month(d) |
The year; the month from 1 to 12. |
date(d) |
The day of the month, 1 to 31. |
day(d) |
The weekday from 1 (Monday) to 7 (Sunday). |
week(d) |
The ISO week number. |
hour(d), minute(d) |
The hour (0 to 23) and minute. |
timestamp(d) |
Milliseconds since 1 January 1970 UTC. |
fromTimestamp(n) |
A date from milliseconds since 1 January 1970 UTC. |
formatDate(d, pattern) |
The date as text in a pattern (see below). |
Units for dateAdd, dateSubtract and dateBetween: "seconds", "minutes", "hours",
"days", "weeks", "months", "quarters", "years".
Patterns for formatDate:
| Token | Shows | Token | Shows |
|---|---|---|---|
YYYY |
2026 | HH |
14 (24-hour) |
MMMM |
March | hh |
02 (12-hour) |
MMM |
Mar | A |
PM |
MM |
03 | mm |
05 (minutes) |
M |
3 | ss |
09 (seconds) |
DD |
07 | dddd |
Tuesday |
D |
7 | ddd |
Tue |
Text in square brackets is shown as it is: formatDate(prop("Due"), "[Due on] MMM D, YYYY") gives
Due on Mar 7, 2026. Month and weekday names are in English. Patterns can be up to 200 characters
and cannot contain %.
dateBetween(prop("Due"), today(), "days")
formatDate(dateAdd(prop("Start"), 2, "weeks"), "YYYY-MM-DD")
if(prop("Due") < today() and not(prop("Done")), "Overdue", "")
How dates behave:
- Date properties, created and edited times,
now(),today(),parseDate()and the other date functions give real dates. Text that only looks like a date stays text: useparseDate()to turn it into a date. The result offormat()orformatDate()is text. - A date without a time stays a whole day when you add days, weeks, months, quarters or years.
- Adding months keeps the day of the month where it can; 31 January plus one month is the last day of February.
- Comparisons and sorting use the exact moment. Equality of two dates with times needs the same moment.
now()andtoday()use the server’s clock in UTC. Near midnight,today()can differ from the date where you are.- Dates with a time zone keep it; adding days follows daylight saving changes, and a result that falls into a missing or doubled hour is an error.
- A formula that gives a date can be the date of a calendar or timeline view (see Calendar view).
People and pages
| Function | Result |
|---|---|
name(x) |
A person’s name or a page’s title. |
email(person) |
A person’s email address. |
id(x) |
A person’s or page’s ID. |
id() |
The ID of the current page. |
prop(page, "Property") or page.prop("Property") |
A property of a related page. |
prop("Assignees").map(current.email()).join(", ")
prop("Assignees").map(current.name()).join(", ")
Related pages
A relation property gives a list of pages, and current.prop("…") reads the related pages’
properties, including their formulas:
prop("Tasks").length()
prop("Tasks").map(current.prop("Estimate")).sum()
prop("Tasks").filter(current.prop("Status") == "Done").length() / prop("Tasks").length()
- Only related pages you can open are included. Someone with access to more pages can see a different result for the same formula.
- Formulas can follow relations two levels deep, for example from a project to its tasks to their assignees’ pages. Deeper chains give an error.
Limits and errors
| Limit | Value |
|---|---|
| Length of a formula | 8,000 bytes and 1,000 parts (numbers, names, operators…) |
| Nesting | 32 levels of brackets and calls |
| Chains of formulas | A formula can use another formula, up to 32 levels |
| Work per page | 10,000 calculation steps for all formulas of one page together |
| Lists | 1,000 items |
| Text and other results | 20,000 bytes |
| Regular expressions | Patterns of up to 1,000 bytes |
| Related pages | Two levels deep, up to 10,000 related pages |
These give an error instead of a value: a formula that uses itself (directly or through other formulas), an unknown property, function or variable, the wrong number of arguments, a wrong type (for example a number where text is needed), division by zero, invalid dates, and any of the limits above. Formulas never access the network, files or other data on the server.
A formula with an error in one page is empty for filters, sorts, charts and totals; the reason is shown when you hover the error.
About this part of Venolio: Databases and projects without a separate tool
Checked against the app on . The same help is built into the Venolio apps and works offline. Something wrong or missing? Tell us.