Tinderbox 8 Icon

every(group,value)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Group   [operators of similar scope]

 Non-query Boolean   [other Non-query Boolean operators]

 Baseline

 


every(group, value)

This Boolean operator examines a group of notes and determines whether the value of every note in the group meets a criterion.

group 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.

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

value 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 group is empty. Thus, every() is false if value is false for any designated note. If there are no designated notes at all, i.e. group 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 group contains something. In the above example, that uses the group 'children', a modification can be used, like this:

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