Red's Notion Formula Sheet
Name
Tags
Type
Syntax
Description
Example
Template Example
Operators
Text
boolean ? value : value
if(boolean, value, value)
Returns the second value between two options.
(prop("Sections Read") / prop("Sections") == 0 ? " ✖︎":"")
Operators
Text
if(boolean, value), if(boolean, value), if(boolean, value), "value"
Returns the value of multiple If statements.
if(prop("Length") < 180, "⚡️Quick Read", if(prop("Length") <= 360, "☀️Ideal Read", if(prop("Length") <= 1200, "☄️Lengthy Read", "")))
Operators
#
number + number
text + text
add(number, number)
add(text, text)
Adds two numbers and returns their sum, or concatenates two strings.
prop("Principal") * .04 + prop("Min. Interest Payment")
Operators
#
number - number
subtract(number, number)
Subtracts two numbers and returns their difference.
round(prop("Rollup Calorie Hide") - prop("Rollup Sum HIde"))
Operators
#
number * number
multiply(number, number)
Multiplies two numbers and returns their product.
prop("Principal") * .04 + prop("Min. Interest Payment")
Operators
#
number / number
divide(number, number)
Divides two numbers and returns their quotient.
prop("Rollup Tags Hide") / prop("Rollup Name Hide")
Operators
#
number ^ number
pow(number, number)
Returns base to the exponent power, that is, baseexponent.
pow(2, 6)
Operators
#
number % number
mod(number, number)
Divides two numbers and returns their remainder.
prop("Number of Students") % 3
Operators
#
- number
unaryMinus(number)
Negates a number. (Turns a positive number into a negative number)
unaryMinus(42) == -42
Operators
#
+ value
unaryPlus(value)
Converts its argument into a number. (example: count number of values in another property)
unaryPlus(prop("Tags") == "Operators")
Operators
Checkbox
not boolean
not(boolean)
Returns the logical NOT of its argument.
not true == false
Operators
Checkbox
boolean and boolean
and(boolean, boolean)
Returns the logical AND of its two arguments.
(prop("Daily Habit 1") and prop("Daily Habit 2") and prop("Daily Habit 3")) ? "🏁" : "Not Complete"
Operators
Checkbox
boolean or boolean
or(boolean, boolean)
Returns the logical OR of its two arguments.
or(false, false) == false
Operators
Checkbox
value == value
equal(value, value)
Returns true if its arguments are equal, and false otherwise.
(toNumber(prop("Streaks Additions")) / prop("Number of Habits") == 0 ? "😢": "")
Operators
Checkbox
value != value
unequal(value, value)
Returns false if its arguments are equal, and true otherwise.
(true != not false) == false
Operators
Checkbox
text > text
boolean > boolean
date > date
number > number
larger(text, text)
larger(boolean, boolean)
larger(date, date)
larger(number, number)
Returns true if the first argument is larger than the second.
5 > 3 == true
Operators
Checkbox
text >= text
boolean >= boolean
date >= date
number >= number
largerEq(text, text)
largerEq(boolean, boolean)
largerEq(date, date)
largerEq(number, number)
Returns true if the first argument is larger than or equal to than the second.
(prop("Sum Word Count") / prop("Goal Per Day") >= 1 ? "✏️You Did It!": "")
Operators
Checkbox
text < text
boolean < boolean
date < date
number < number
smaller(text, text)
smaller(boolean, boolean)
smaller(date, date)
smaller(number, number)
Returns true if the first argument is smaller than the second.
10 < 8 == false
Operators
Checkbox
text <= text
boolean <= boolean
date <= date
number <= number
smallerEq(text, text)
smallerEq(boolean, boolean)
smallerEq(date, date)
smallerEq(number, number)
Returns true if the first argument is smaller than or equal to than the second.
(smallerEq(prop("Pgs Read") / prop("Length"), 0.1) ? "◉ ": "")
Functions
Text
concat(text...)
Concatenates its arguments and returns the result.
concat("dog", "go") == "doggo"
Functions
Text
join(text...)
Inserts the first argument between the rest and returns their concatenation.
join("-", "a", "b", "c") == "a-b-c"
Functions
Text
slice(text, number)
slice(text, number, number)
Extracts a substring from a string from the start index (inclusively) to the end index (optional and exclusively).
slice(prop("Author"), 0, 3)
Functions
Text
format(value)
Formats its argument as a string.
(prop("Day of Week") == "Monday") ? format(13) : ""
Functions
#
toNumber(text)
toNumber(number)
toNumber(boolean)
toNumber(date)
Parses a number from text.
toNumber(prop("Price 1")) + toNumber(prop("Price 2"))
Functions
Checkbox
contains(text, text)
Returns true if the second argument is found in the first.
(contains(prop("Area 1"), "Triceps") or contains(prop("Area 1"), "Biceps") or contains(prop("Area 1"), "Shoulders") or contains(prop("Area 1"), "Chest") or contains(prop("Area 1"), "Back") ? 6: 0)
Functions
Text
replace(number, text, text)
replace(text, text, text)
replace(boolean, text, text)
Replaces the first match of a regular expression with a new value.
replace("1-2-3", "-", "!") == "1!2-3"
Functions
Text
replaceAll(number, text, text)
replaceAll(text, text, text)
replaceAll(boolean, text, text)
Replaces all matches of a regular expression with a new value.
replaceAll("1-2-3", "-", "!") == "1!2!3"
Functions
Checkbox
test(number, text)
test(text, text)
test(boolean, text)
Tests if a string matches a regular expression.
test("1-2-3", "-") == true
Functions
Checkbox
empty(number)
empty(text)
empty(boolean)
empty(date)
Tests if a value is empty.
empty("") == true
Functions
#
ceil(number)
Returns the smallest integer greater than or equal to a number.
ceil(100 * prop("Completed") / prop("Subtasks")) / 100
Functions
#
floor(number)
Returns the largest integer less than or equal to a number.
floor(100 * prop("Completed") / prop("Subtasks")) / 100
Functions
#
log10(number)
Returns the base 10 logarithm of a number.
(log10(prop("Goal") / 5000) / log10(1 + prop("Annual Interest Rate") / prop("Frequency Hide")) / prop("Frequency Hide"))
Functions
#
round(number)
Returns the value of a number rounded to the nearest integer.
round(100 * prop("Wins") / (prop("Games") - prop("Draws"))) / 100
Functions
#
sign(number)
Returns the sign of the x, indicating whether x is positive, negative or zero.
sign(4) == 1
sign(-9) == -1
sign(0) == 0
Functions
#
timestamp(date)
Returns an integer number from a Unix millisecond timestamp, corresponding to the number of milliseconds since January 1, 1970.
timestamp(now()) == 1512593154718
Functions
Date
fromTimestamp(number)
Returns a date constructed from a Unix millisecond timestamp, corresponding to the number of milliseconds since January 1, 1970.
fromTimestamp(2000000000000) == Tue May 17 2033
Functions
Date
dateAdd(date, number, text)
Add to a date. The last argument, unit, can be one of: years, quarters, months, weeks, days, hours, minutes, seconds, milliseconds.
dateAdd(prop("Start Date"), prop("Years to Goal"), "years")
Functions
Date
dateSubtract(date, number, text)
Subtract from a date. The last argument, unit, can be one of: years, quarters, months, weeks, days, hours, minutes, seconds, milliseconds.
dateSubtract(prop("Alarm Set"), 7, "hours")
Functions
#
dateBetween(date, date, text)
Returns the time between two dates. The last argument, unit, can be one of: years, quarters, months, weeks, days, hours, minutes, seconds, milliseconds.
(dateBetween(prop("Due Date"), prop("Current Date"), "days")
Functions
Text
formatDate(date, text)
Format a date using the Moment standard time format string.
formatDate(now(), "MMMM D YYYY, HH:mm") == March 30 2010, 12:00
Functions
#
minute(date)
Returns an integer number, between 0 and 59, corresponding to minutes in the given date.
dateBetween(end(prop("Stopwatch")), start(prop("Stopwatch")), "minutes")
Functions
#
hour(date)
Returns an integer number, between 0 and 23, corresponding to hour for the given date.
dateBetween(prop("Clock Out"), prop("Clock In"), "hours")
Functions
#
day(date)
Returns an integer number corresponding to the day of the week for the given date: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.
dateBetween(prop("Deadline"), prop("Today"), "days")
Functions
#
date(date)
Returns an integer number, between 1 and 31, corresponding to day of the month for the given.
date(now()) == 13
Functions
#
month(date)
Returns an integer number, between 0 and 11, corresponding to month in the given date according to local time. 0 corresponds to January, 1 to February, and so on.
month(now()) == 11
Functions
#
year(date)
Returns a number corresponding to the year of the given date.
prop("Years to Goal"), "years")