Sub-tables (Line Items)

A sub-table is a set of repeating child rows entered together with a record — invoice lines, order items, journal entries. The rows are saved in one transaction with the parent record and can only be edited through it. Delete the parent and its lines go with it.

This is different from a related record tab, which shows independent records from another table that merely link back. Sub-table rows have no life of their own: no separate grid, no direct create — they exist only inside their parent record.

Invoice record with an editable line-item grid and a rollup total

When to use one

Use a sub-table when a record needs a variable-length list of detail rows that belong to it and nothing else:

  • An invoice with line items (description, qty, price).
  • An order with order lines.
  • An expense report with individual expenses.
  • A timesheet with day-by-day entries.

If the child rows are meaningful on their own — customers, products, projects that many records reference — use a lookup field and a related record tab instead.

Create a sub-table

  1. Open a table and go to Configure → Fields.
  2. Find the Sub-tables (line items) section and click Add sub-table.
  3. Give it a name (e.g. Line Items) and define its columns — the same field types you use on a normal table (text, number, date, select, calculation, and so on).
  4. Save.

A sub-table's columns are edited from this same section any time. Because a sub-table is provisioned for exactly one parent, it never appears as a standalone table in the workspace.

Enter line items

On the parent record's form, each sub-table shows as an editable grid. Type across a row to fill a line; a fresh blank row appears as soon as you start on the last one, so you can keep adding lines without a button. Leave the trailing blank row empty — empty rows are dropped when you save.

Everything is written atomically with the parent: press Save once and the record and all its lines commit together.

Rollup fields — totals from the lines

A Rollup field is a stored column on the parent that summarises its sub-table's line items — a sum of line totals, a count of rows, an average, a min, or a max.

  1. Add a field on the parent table and choose Rollup.
  2. Pick the Sub-table, the Function (sum, count, average, min, max), and — for anything but count — the child Field to aggregate.
  3. Optionally set Decimals for how the number formats.

The rollup recomputes every time you save the parent, so an invoice total always reflects its current lines. Rollups are read-only — you can't type into them, and they're excluded from web forms and the API, like calculation fields.

Rollups are not retroactive: a record saved before you added the rollup field (or whose lines were changed by some path other than the record form) shows blank until you open and re-save it.

Need a per-line derived value instead of a parent total — a line's qty × price? Add a Calculation field on the sub-table.

Reporting on line items

A sub-table has no page of its own, so its analytics — "units sold across all order lines", "revenue by product" — live on the parent's report rail. When you create a report on the parent, the editor's Report on selector lets you point the report at the sub-table instead of the parent, aggregating every line across all records. See Reports → Report on a related table.