CTCOUNT
Returns the number of child records for each parent. The optional filter query restricts the child records to be included in the calculation.
CTCOUNT ( <table_name or field_name>, [<filter_query>] [,<resolution-level>])
- table_name or field_name: The name of the field to count.
- filter_query: A query string representing the domain of records to include.
- resolution_level: A table name of the level to count the records at.
Example: create a field on the CUSTOMER table that returns how many products of type B each customer has bought.
CTCOUNT([CUSTOMER],[PRODUCT.PRODUCT_CODE] = "B")