Boolean values represent truth states: either true or false.
Notion represents Boolean values as checkboxes:
- True is represented by a checked box
- False is represented by an unchecked box
These resources aren’t necessary for understanding how to work with Booleans in Notion, but you may find them interesting if you want to dive deeper into how Booleans are used in programming and computer science.
True or false Boolean values are usually determined by the outcome of a statement containing a Boolean operator. For example:
10 > 5 // Output: True "Monkey" == "Banana" // Output: False
However, there are also some values in Notion formulas that are inherently truthy or falsy.
The following values in a Notion formula are always falsy:
""(an empty string)
You can test this for yourself by creating a Notion formula containing this statement, which outputs false:
0 ? true : false // Output: False
By contrast, the following will output true:
1 ? true : false // Output: True
All values not listed above are inherently truthy, including:
"0"– a string containing 0
"false"– a string containing “false”
"anything"– a string containing any text
now()– a date (the now function outputs the current date and time as a date object)
You can see proofs of these statements in this example database:
Boolean Operators in Notion
Notion comes with several Boolean operators.
These can be used to perform comparisons between two values (which must share the same data type), outputting a true or false value.
They can be separated into two categories: logical operators and comparison operators.
Logical operators return a Boolean value, and often allow you to combine and evaluate multiple expressions.
Notion provides three logical operators.
Good to know: Notion is picky about how you must write logical operators. Only the listed symbols will work, and they are case-sensitive.
E.g. You must use
and for the and operator –
&& will not work in Notion.
Comparison operators allow you to compare operands that share a data type.
Notion provides six comparison operators: