How to create dynamic lists and tables with repeat blocks in merge templates
Overview
Repeat Blocks in Zoho Writer’s Mail Merge help you duplicate blocks of content like rows in an invoice or items in a list based on multiple records in your data source. This is useful for generating dynamic documents such as purchase orders, offers, or event lists.
You can insert repeat content using records from either the Main data (primary record) or Subform (related list) records.
Prerequisites
- Merge template must be connected to a valid data source (Zoho Sheet, Zoho CRM, Zoho Creator, etc.)
- The source should contain a list or subform with repeatable entries
Steps
- Open your merge template, go to Automate tab > Configure
- On the Configure Template panel that opens on the right page, click the required tab:
- Main (for main record repeat), or
- Subform (for subform record repeat).
Click Repeat option and select one of the repeat types (for e.g Simple Repeat, Row Repeat ...etc ) as shown below.
- Insert Simple Repeat - Repeats a block of content without using a table.
- Best suited for repeating paragraphs or structured content blocks.
- Ideal when you want narrative-style repeated content.
- Insert Table for Row Repeat - Repeats a table row based on the row you defined with data fields.
- Best for invoices, product lists, payment schedules, and itemized data.
- Each data record generates a new row.
- Insert Table for Column Repeat - Repeats a table column based on the column you defined with data fields.
- Useful for horizontally structured layouts.
- Each data record generates a new column.
- Insert Table for Cell Repeat - Repeats specific table cells based on the selected cell with data fields.
- Suitable for compact grid-style layouts.
- Allows repetition within individual cells instead of full rows or columns.
- Choose the required fields and click Repeat to insert.
- Format the block (e.g., add headers, adjust spacing or table design)
- Click Preview Merge to verify the output.
Additional Note
- If you're using Repeat as Columns with over 6 records, you’ll see a warning. You can switch to rows if needed.
- To assign an incrementing number to each entry, insert the Auto-number field before the repeated block. This is useful for numbering items, tasks, or rows in a table.
Troubleshooting
1. Error/Symptom: Repeat block doesn't appear in the output
Possible cause: The selected field wouldn't be a list or subform
Recommended solution: Choose a field that contains multiple entries, such as an array or subform in your data source.
2. Error/Symptom: Output layout looks broken or misaligned.
Possible cause: Placeholders inside the repeat block could be incorrectly positioned or the table is not formatted properly
Recommended solution: Revisit the template layout and ensure all merge fields are placed within the designated repeat block or table cell.
Possible cause: The subform might not be properly mapped to the template
Recommended solution: Verify that the subform is configured correctly while setting up the repeat block
Related Articles
- How to create auto number field that increments on each form submission
- Sample JSON as Data Source