The not operator inverts the truth value of a Boolean/Checkbox value in a Notion formula. Another way of thinking about it is that it returns true only if its operand is false. It accepts Boolean operands.
not Boolean
!Boolean
Code language: JavaScript (javascript)
It can be used in several ways, including:
- Changing
true
tofalse
, or vice-versa - Checking whether a property is not empty
- Inverting the truth value of an if statement
Good to know: Notion is no longer picky, so !
, NOT
, and Not
now also work.
Example Formula
not true /* Output: false */
NOT empty("Hello") /* Output: true */
!if(50 > 40, true, false) /* Output: false */
Code language: JavaScript (javascript)
Example Database
This example database shows a list of applications to join a pirate crew. The captain only wants to hire pirates that have powers, and he won’t accept anyone with snot-based powers. That’d be gross.
The Interview checkbox returns true only if both of those conditions are met. The Interviews view filters by this checkbox, showing the captain only the candidates that meet his conditions.
View and Duplicate Database
“Interview” Property Formula
if(
not empty(
prop("Power")
) and not test(
prop("Power"), "[Ss]not"
),
true,
false
)
Code language: JavaScript (javascript)
This formula uses a couple other functions: