Function reference
The Formula language has a fixed set of functions. A function that is not listed in this reference does not exist, and calling it is an unknown-function error. Each entry shows the signature and examples with the value they give; the examples run as tests of the language.
| Family | Functions |
|---|---|
| Logic | if, ifs, empty, equal, unequal, and, or, not, let, lets |
| Text | length, substring, contains, test, match, replace, replaceAll, lower, upper, repeat, trim, format, padStart, padEnd, isValidIsin |
| Numbers | add, subtract, multiply, divide, mod, pow, min, max, sum, median, mean, abs, round, ceil, floor, sqrt, cbrt, exp, ln, log10, log2, sign, pi, e, toNumber, formatNumber |
| Dates | now, today, minute, hour, day, date, week, month, year, dateAdd, dateSubtract, dateBetween, dateRange, dateStart, dateEnd, timestamp, fromTimestamp, parseDate, formatDate |
| Lists | at, first, last, slice, concat, sort, reverse, join, split, unique, includes, find, findIndex, filter, some, every, map, flat, count, splice |
| Statements | setProp, unsetProp, keepProps, insertRow, splitRows, appendRows, spreadProps, each, dropRow, filter, sortBy, desc, groupBy, do, if |
| Context and named tables | context, inputs, rowIndex, input, prop, getProp, find, findAll, rows, exceptions |
| Exceptions | raiseException and its chained setProp |
| Styles and viewer | setStyle, setRowStyle, clearStyle, clearRowStyle, me, optionColor |
Calling conventions
Section titled “Calling conventions”- Dot form: every function written
upper(name)can also be writtenname.upper(). In the dot form, the receiver is the first argument. - List callbacks:
map,filter,find,findIndex,some, andeverybindcurrent(the item) andindex(its zero-based position) inside their second argument. - Exact numbers: every number is an exact decimal while a formula computes, so
5 / 10is0.5. - UTC dates: dates are UTC and are written to cells as ISO-8601 text.
- Regular expressions:
test,match,replace, andreplaceAlltake JavaScript regular expressions as text. - Fontana extensions: a form that Notion Formula 2.0 does not have, such as
concatof texts or the third argument offormatNumber, says so in its description.
The verbs that load and send data (fromFile, toFile, fromApi, …) and the shaping statements setType, rowKey, and subgrid are documented with their options in Load data, Map and shape columns, and Export data.