This version is out of date, covering development from v9.0.0 to v9.3.0. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

count_if(group, condition)


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Group   [operators of similar scope]

 Data manipulation   [other Data manipulation operators]

 9.0.0

 


count_if(group, condition)

Counts the number of notes in the list derived from group that satisfy the expression condition.

group describes the notes to be examined and may be any group designator including a find() query.

condition is action code forming a valid conditional query test, i.e. it equates to true when matched. Some query-style operators terms may allow use of regular expressions.

This equivalent to use of sum_if(), as the next two code examples have the same result:

sum_if(group, condition,1)

but this is perhaps more easily understood as:

count_if(group, condition)