Count open children
Show how many related records are still open — open tickets on a customer, pending applications on a job, unchecked items on a request. Use an auto field with Set to the count of records of type and a filter.
When to use this
- Customer → open support tickets
- Job → applications still in
Screening - Project → tasks where
doneis false - Badge or KPI on a parent detail page
The same pattern works for “all children” (no status filter) or for counts that are not parent/child — see the same-day events example in Auto fields.
Data model
| Object | Key fields |
|---|---|
| Customer | name, open_tickets (Number, auto) |
| Ticket | customer (Reference → Customer), status (Choice: Open / Pending / Closed), subject (Text) |
Put the Reference on the child (Ticket.customer).
Steps
- On Customer, create Number field
open_tickets. - Enable Automatic Value.
- Choose Set to the count of records of type → Ticket.
- Add a filter so only open work counts, for example:
statusisOpen(and/orPending), and- the ticket is linked to this customer (via the connection, or an explicit
customerequals current record filter if you configure it that way).
The field recalculates when tickets are created, closed, or reassigned.
Show it
- Column on the customers Grid so operators sort by backlog
- KPI Cards on the customer detail page
- Menu or display rules that hide “Close account” while
open_tickets> 0
Boolean helper (optional)
Add a Yes/no auto field has_open_tickets with a numeric/boolean expression or a conditional rule when the count is greater than zero — handy for filters and login/visibility rules that prefer booleans.
Tips
- Filters inside the count must match how you actually store status (exact Choice values).
- For sums of amounts on open children only, use Set to the sum of a field with the same status filter — see Sum of prices.
- During bulk imports, disable automatic fields, then recalculate.
Related
- Auto fields
- Data modeling
- Discount tiers — conditional values on the parent
- Recruiting tutorial — applications per job