every

Learn how to use the every function in Notion formulas.

The every() function will return true if all items in a list match the condition (unlike some, which only requires at least one element to match it).

every(list, condition)

list.every(condition)
Code language: JavaScript (javascript)
[1, 2, 3, 4, 5].every(
  current > 0
)

/* Output: true */
Code language: JavaScript (javascript)

You can use every() to validate dates. Note how the last date in this example list is invalid:

["1999-04-01", "2023-01-25", "2025-13-32"].every(
  current.parseDate()
)

/* Output: false */
Code language: JavaScript (javascript)

You can also use every() to run a check on a specific property within every page in a Relation property. For example, let’s say we want to check whether or not every task in a project is done:

prop("Tasks").every(
  current.prop("Status") == "Done"
)

/* Sample Output: false */
Code language: JavaScript (javascript)

Once you have this value in a formula property, you could even filter a database view by it in order to show only projects that have incomplete tasks.

About the Author

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.

🤔 Have an UB Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas

🤔 Have a Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas