and
Learn how to use the Boolean "and" operator in Notion formulas.
1
Boolean and Boolean
2
and(Boolean, Boolean)
And is useful for testing that two or more things are true.
Good to know: Notion is picky, so
&&
, AND
, and And
won’t work here. Only the case-sensitive and
will be accepted.You can also use the function version,
and()
.1
true and true // Output: true
2
3
true and false // Output: false
4
5
and(1>0,0<4) // Output: true
6
7
if(true and true, "Happy", "Sad") // Output: "Happy"
8
9
if(true and false, "Happy", "Sad") // Output: "Sad"
10
11
if(5>4 and 1<3, true, false) // Output: true
12
13
if(length("Monkey D. Luffy") > 5 and length("Monkey D. Luffy") < 100, true, false) // Output: true
The
and
operator can also be chained together multiple times:1
4>2 and 3<4 and 5>2 and 7==7 ? true : false // Output: true
The example database below shows a list of shore leave requests from a pirate crew. The captain will only approve a request if both are true:
- The request doesn’t fall on one of that crew member’s watch duty days
- The crew member has less than $10,000 in gambling debt
The Approved? formula uses the and operator to ensure that both of these conditions are true. If so, it’ll output
true
and the request will be approved. If not, it’ll output false
and the request will be denied.
1
// Compressed
2
if(prop("Gambling Debt") < 10000 and not contains(prop("Watch Duty Days"), formatDate(prop("Request Date"), "dddd")), true, false)
3
4
// Expanded
5
if(
6
prop("Gambling Debt") < 10000
7
and
8
not contains(
9
prop("Watch Duty Days"),
10
formatDate(
11
prop("Request Date"),
12
"dddd"
13
)
14
),
15
true,
16
false
17
)
- The first operand checks that the crew member’s gambling debt is
< 10000
- The second operand checks the request date against the crew member’s assigned watch days:
- The contains function checks to see if the Request Date’s day of the week is contained in the Watch Duty Days list for each row.
- The formatDate function uses the Moment.js string
dddd
to convert the Request Date into a named day of the week (i.e. “Wednesday”) so it can be compared against the tags in the Watch Duty Days property. - Finally, the not operator negates the boolean output of the
contain()
function, ensuring theand
operator only returnstrue
if the Request Date DOESN’T match an assigned Watch Duty Day.
My name is Thomas Frank, and I'm a Notion-certified writer, YouTuber, and template creator. I've been using Notion since 2018 to organize my personal life and to run my business and YouTube channel. In addition to this formula reference, I've created a free Notion course for beginners and several productivity-focused Notion templates. If you'd like to connect, follow me on Twitter.

Last modified 4mo ago