Tables
Tables allow you to render structured rows and columns of data in your templates. They are ideal for asset summaries, fee schedules, insurance policies, and any repeated tabular data.
Syntax
A table field uses a loop directive inside a standard table row. The loop iterates over an array of objects, and each column references a property of the current item.
Template syntax
| Asset Name | Current Value | Recommended Action |
|------------------|---------------|--------------------|
| {{#each assets}} | | |
| {{name}} | {{value}} | {{action}} |
| {{/each}} | | |How it works
When the document is generated, the {{#each assets}} block repeats the row for every item in the assets array. Each row has access to the properties of the current item.
Column alignment
Table column widths are determined by your template's Word or document styling. AdviceDocs preserves the column layout you define in your uploaded template file.
Example data
Data
{
"assets": [
{ "name": "Australian Equities Fund", "value": "$120,000", "action": "Hold" },
{ "name": "International Bond Fund", "value": "$80,000", "action": "Increase" },
{ "name": "Cash Account", "value": "$50,000", "action": "Reduce" }
]
}Empty tables
If the data array is empty, the table rows inside the loop will not render. You can use a conditional block around the table to show a fallback message when no data is available.