Tables in a template come in two flavours. One is a grid of cells you type into directly; the other is a shape that gets filled with rows at render time. They look almost identical in the editor. Once you know which is which, the behaviour differences make sense.
Two kinds of tables
| Static table | Data table | |
|---|---|---|
| Rows come from | What you typed | A list field in the template’s data |
| Row count at render | Fixed — same as in the editor | Variable — one row per input record |
| tbody content | Literal cells | A template row that expands per input record |
| Preview | Shows the typed rows | Shows rows filled from sample data |
Use a static table for anything with a fixed structure — a signature block, a two-column form header, a hard-coded pricing matrix that never changes per render.
Use a data table for anything that varies per fill — line items on an invoice, employees in an org directory, monthly sales figures, participants in a workshop.
Where the rows come from
A data table repeats over a list field in the template’s data — line_items, attendees, tax_entries. You pick that list once, when you set the table up; it’s a property of the table, not of a specific row.
- While authoring, the list comes from your sample data, so the preview shows realistic rows.
- At render time, it comes from whatever fills the template — a pipeline row fetched from a spreadsheet or CRM, a form submission, or an API call.
Row template and body expansion
In the editor, a data table shows exactly one tbody row, with variable chips in each cell that reference row-scoped fields ({{item.description}}, {{item.total}}). This is the template row.
At render time the template row expands — one rendered row per input record. Variables inside the row resolve against that record. Variables outside the row (in thead or tfoot) resolve against the outer schema.
The tfoot can reference aggregates over the rendered rows via the aggregate. path family — aggregate.total, aggregate.subtotal. See the Schema page for the aggregate path convention.
Joining a second list
Sometimes one list isn’t enough — line items that need their tax details, orders that need the matching customer record. A data table can join rows from a second list by matching fields (for example sku on both sides):
- Keep every row from the main list, filling in matched details where they exist (a left join).
- Keep only matched rows, dropping main-list rows that have no partner (an inner join).
Most templates only need one list. Joins come up for reports that merge several feeds.
Edge cases
Zero rows. The body renders no rows; the rest of the table stays in place.
More rows than fit on a page. The table continues onto the next page. Turn on Repeat on breaks for the header to print the header row again at the top of each page.
Grouped rows. A data table can group its rows by a field — for example, line items grouped by category — instead of listing them flat.
See also
- How variables bind to content — the chip + schema + sample-data triangle data tables live inside
- Schema — list-typed fields,
aggregate.paths