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)