The true
constant represents the Boolean output true
. Its opposite is false.
true
Code language: JavaScript (javascript)
Type true
into a Notion formula property, and that property will output a checked checkbox, representing the value true
.
A Boolean value has only two states, which can be thought of as:
- True or False
- 1 or 0
- On or Off
A Boolean simply represents the two truth values of logic.
Notion represents Boolean values with checked (true) and unchecked (false) checkboxes.
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.
Example Formulas
This formula will simply output true
in a Notion formula property, displaying as a checked checkbox:
true
Code language: JavaScript (javascript)
Here’s a slightly more complex example formula that uses Notion’s if function:
true ? "😀" : "😭"
Code language: JavaScript (javascript)
This is an if()
statement written in shorthand – it could also be written as if(true,"😀","😭")
. It will simply output 😀 if the condition is true. The condition is the first part of the if()
statement, or what is left of the ?
in the shorthand formula.
Since the Boolean true
outputs true
naturally, the result will be 😀. See the Happy property in the example database below for proof.
Example Database
true
and false
are case-sensitive. Typing True
or False
will result in a syntax error.
Here you can see how Notion displays true
and false
Boolean values. You can also see the output of our Happy formula, which is shown above.
View and Duplicate Database
Other formula components used in this example: