Skip to content

Demo: Any() & All()

Aggregating boolean results across a filtered subset

Any() vs All()

When evaluating linked records, you often need to check a condition across an entire subset.
Use Any() when you want to know if at least one item meets the condition.
Use All() when you want to ensure every single item meets the condition.
// Any() aggregates the boolean results across the filtered set
DB Tasks
.Filter(Project.Contains(thisRow))
.ForEach([Due Date] < Today() AND Status != "Completed")
.Any()

// Are all tasks on this project completed?
DB Tasks
.Filter(Project.Contains(thisRow))
.ForEach(Status = "Completed")
.All()
See it in action below on the DB Projects table:
DB Projects Example
Name
Owners
Archived
Has Overdue Tasks?
All Tasks Completed?
Website Redesign
Q4 Marketing Campaign
Internal Audit
Legacy Cleanup
There are no rows in this table

Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.