Count Company Data
Use this action when you need to know how many records match a filter, not the records themselves.
Best for
- Branching on whether anything matched at all
- Showing a total in a message or notification
- Checking a limit before creating another record
Main fields
| Field | What it does |
|---|---|
| Dynadata Item Type | Chooses what kind of records to count |
| Filter CEL Mongo Filter | Defines which records should be counted. Leave it empty to count everything you have access to |
| Search | Case-insensitive substring term, matched against the fields listed in Search fields |
| Search fields | The field names the Search term is matched against, e.g. ["name","email"] |
What later steps can use
The total is available at:
step(N).count
Tips
- Use this instead of Search company data when you only want the number. Search returns one page of results (50 by default), so counting the records it returns silently caps at the page size on larger collections.
- A count of
0is a valid answer. When you branch on it, compare the number —step(0).count > 0— rather than testing the value for truthiness, because0is falsy. - The same permissions apply as to Search company data: you only ever count records you are allowed to see.