Manual · 3

Child records

Shows every row of another table that points to this row via a foreign key – as a list, not as a single value. The reverse of a foreign key field: there, the “child” row points to its one “parent” row; here, the “parent” row shows all of its child rows at once.

Practical example: an invoice should show its line items as a list – a column “Line items” on the invoices table that lists every matching row from invoice_items.

If you only need one aggregated value across the child rows (e.g. “number of line items” or “sum of all line item prices”), a simpler rollup field is often enough. A child records field is worth it when the individual rows themselves should be visible – in the grid view, as a list in the form, or in a document template.

Creating one

When adding a new column, in the “Child records” tab you choose:

  1. the child table (any other table in the same data source),
  2. its foreign key field that points back to this table,
  3. the columns to display from the child table (multi-select – if left empty, every physical column of the child table is shown).

A child records field is read-only: rows can’t be added or removed directly from the parent row – that would mean changing the child row’s foreign key field. To add, remove, or edit a child row’s values, open it via its own table or by clicking it (see below).

Display in the grid view

A cell always shows a badge with the count of matching child rows, e.g. “3 records” – regardless of how many columns were selected, there is (unlike links fields) no inline chip view, since multi-column child rows don’t fit that well.

Clicking the badge opens a modal with a simple table: one column per selected child column, one row per child record. Clicking a row opens the child table’s full record for editing.

Summary aggregation

In the grid view’s summary footer, only COUNT is available for a child records column – it counts the total number of child rows across all parent rows currently shown (not just the row count in a single row’s badge). SUM, AVG, MIN, and MAX aren’t available for this field type – for a single aggregated number across the child rows (e.g. a sum), a rollup field is the right choice.

In document templates

A child records field can be used in a document template as an iterable list, exactly as in the example above:

{% for item in line_items %}
  {{ item.description }} -- {{ item.quantity }} x {{ item.unit_price }}
{% endfor %}

Each entry (item) carries exactly the columns selected when the column was created.

Changing the connection afterward

Via the column context menu → “Edit field” you can adjust an existing child records field’s connection at any time, without having to delete and recreate the column. In the edit modal, in addition to field name and display format, pre-selected dropdowns or a multi-select appear for:

  1. the child FK column (child table together with the foreign key field that points back to this table),
  2. the columns to display from the child table (multi-select).

Both can be changed independently of each other; clicking “Save” applies the new connection immediately.

Known limitations

  • Not filterable (like rollup – lookup and links are).
  • No limit per parent row: every matching child row is loaded, even if there are very many.

If you only need a value from the target row in the other direction (a child row looking at its parent row), see Lookup.