=INSTANCECOUNT
The =INSTANCECOUNT function returns the number of records in a process table that match a specified query. Useful for counting related entries, validating data, and conditional workflow logic.
Syntax
Section titled “Syntax”=INSTANCECOUNT(TableID; TableQuery)Parameters
Section titled “Parameters”-
TableID – The unique identifier of the process table to query.
-
TableQuery – The query used to filter records in the table (e.g., [eq]Value).
How It Works
Section titled “How It Works”-
Evaluates all records in the specified table that match the query.
-
Returns a numeric count of matching instances.
-
Supports dynamic queries using field tokens or fixed values.
Usage Notes
Section titled “Usage Notes”-
Table queries must follow the correct query syntax (e.g., [eq], [neq]).
-
Field tokens in the query are filled in when the formula runs. If a filled-in value would leave part of the query with nothing to match on (for example, the field is blank, or its value starts with a semicolon), or if it contains
[or]or the wordORwith spaces around it, the function returns nothing instead of a count that includes records you didn’t ask for. A field holding several values separated by semicolons is counted by its first value. A date range with nothing on either side, such as[range]..after two empty date fields are filled in, matches no records, and so does a range the query can’t read. -
Formula functions are case sensitive and must be written in ALL CAPS.
Example
Section titled “Example”=INSTANCECOUNT(123456789012345678; tf_id_123456789012345678_if_text[eq]TestValue)Returns: 6 (Assuming there are six entries in the table that match the query.)
Keywords
Section titled “Keywords”INSTANCECOUNT, count records, table query, record counting, workflow formulas, process table evaluation, matching entries, numeric function, formula function