Skip to main content

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 done is 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​

ObjectKey fields
Customername, open_tickets (Number, auto)
Ticketcustomer (Reference → Customer), status (Choice: Open / Pending / Closed), subject (Text)

Put the Reference on the child (Ticket.customer).

Steps​

  1. On Customer, create Number field open_tickets.
  2. Enable Automatic Value.
  3. Choose Set to the count of records of type → Ticket.
  4. Add a filter so only open work counts, for example:
    • status is Open (and/or Pending), and
    • the ticket is linked to this customer (via the connection, or an explicit customer equals 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.