This version is out of date, covering development from v9.5.0 to v9.7.3. 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(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: 

Operator Has Newer Dot-Operator Variant: 


count_if(scope, condition)

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

scope describes the notes to be examined (defining scope).

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)