Repeat data as a list or table
Choose a Data List, Data Table, or Loop and bind each repeated item to template data.
User guide navigation
On this page
Choose the result you need
| Result | Block | Example |
|---|---|---|
| One list entry per value | Data List | Attachments to a decision letter |
| One table row per object | Data Table | Invoice lines with description, quantity, and amount |
| Several blocks per object | Loop | A heading and address for each recipient |
| A fixed grid you author cell by cell | Table | A short fixed comparison |
You need Content Author access. First define the list and examples on the Data contract tab and save them. Only then configure the block.
List attachments
- Add optional
attachmentsas a List with item type Text. Create an example containingApplication formandSupporting statement. - Choose Save and Done editing, then open the variant in the editor.
- Add a Data List. Set Data Source to
attachmentsand keep Item Variable asitem. - Add a Text block inside its item template. Through
{{, insert the expressionitem. - Choose the List Type: Bulleted for unordered attachments, Numbered when their sequence matters.
- Preview. Two input items should produce two list entries.
Render rows from objects
In the contract, add items as a List with item type Object. Add child fields description (Text), quantity (Integer), and amount (Number). Add an example with at least two objects, then choose Save and Done editing.
{
"items": [
{ "description": "Application fee", "quantity": 1, "amount": 25.5 },
{ "description": "Document copies", "quantity": 2, "amount": 5 }
]
}
- Add a Data Table with three columns.
- Set Data Expression to
items; keep Item Alias asitemand Show Header on. - Select each column body and set Header and Width: Description 60, Quantity 15, Amount 25.
- Add a Text block inside each column body. Insert
item.description,item.quantity, oritem.amountthrough the expression builder. - Format the amount with
$formatLocaleNumber(item.amount, "#,##0.00")when two decimals are required. - Preview. Each object should create one row. The widths set how wide the columns are compared to each other.
Repeat a group of blocks
If each record needs its own heading, paragraph, or other group of blocks, use a Loop. Set its Expression to the array and keep or change its Item Alias. Put the blocks that should repeat inside its body. Use paths such as item.name there.
The item alias exists inside the repeated content. Use the template’s normal field paths outside it.
Check boundary cases
Preview an empty list, one entry, and enough entries to cross a page boundary. If an empty list would leave a heading with nothing under it, hide that heading separately with a condition. If tables or pages break badly, see Layout and resource problems.
Documentation
Exercises
Integration guides
Epistola is open source, not free of cost. The organisations that use it fund its development, through Epistola or an Official Partner. We are steward-owned: fair prices, no profit maximisation. How Epistola is funded →