Tinderbox v9 Icon

every(scope, condition)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Last Altered: 

Operator Uses Regular Expressions: 

Operator Uses Scoped Arguments: 

Operator Has Conditional Arguments: 


every(scope, condition)

This Boolean operator examines notes at scope and determines whether any note (i.e. at least one) in the group evaluates condition as true.

scope is the notes to be examined and may be any group designator including a find() query. If group evaluates to contain no items, see the edge case described below.

condition may be any valid expression, but will usually be a reference to an attribute; short form Boolean attribute expressions are acceptable.

condition must not be enclosed in quotes.

For example:

every(child,$Status=="Important") 

every(children,$Overdue==true) 

every(children,$Overdue) (using short from test)

every(children,$Overdue==false) 

every(children,!$Overdue) (using short from test)

Be aware that a counter-intuitive edge case occurs if the scope is empty. Thus, every() is false if condition is false for any designated note. If there are no designated notes at all, i.e. scope is empty, every() is therefore true, whereas the user might have assumed no outcome and thus no true result. If problematic to the user's intent, this condition can be worked around by first ensuring that scope contains something. In the above example, that uses the scope 'children', a modification can be used, like this:

$ChildCount>0 & every(children,$Overdue==true) 

See also: any().