Generate Separate Documents for Subform Records | Zoho Writer

How to generate a document for every subform record

Overview

Automatically create a separate, personalized document for each subform record by merging it with your main form data in Zoho Writer.

Many data sources contain multiple records within a single submission, such as participants in a course, line items in an order, or applicants in a job application. By default, mail merge treats the main form as the unit of output, so subform records appear as repeating rows in a single document. More info here.

When you transform your data source, Writer generates one document for every record in the selected subform while automatically including the related fields from the parent (main) form.

For example, if a course registration contains three participants, Writer generates three separate certificates, one for each participant, while including the shared course and instructor details from the main form.

Prerequisites

  • A merge template connected to a data source that contains both main form and subform data.

Steps

  1. In the Automation Configuration panel, select Transform Data Source.

  2. Select the subform that you want to use as the unit of output.

  3. Update your merge template by inserting the transformed merge fields. After the transformation, you can insert fields from both the selected subform and its parent (main) form.

  4. Run the mail merge. Writer generates one document for each record in the selected subform while automatically including the corresponding main form fields in every document.

InfoHow the transformation affects your merge
  1. Each subform record is treated as an individual merge record.

  2. Fields from both the selected subform and its parent (main form) are available throughout the merge configuration.

  3. You can use both main form and subform fields when configuring merge outputs, such as document names and folder paths.

Additional Note

Clear an existing data transformation

If you need to switch to a different subform or return to your original data source configuration, you can remove the transformation. Clear the existing data transformation as shown below, then select a different subform or leave the data source in its original state.



Frequently Asked Questions

  1. How many documents are generated?
    One document is created for each record in the selected subform. A parent record with five subform entries produces five documents.
  2. What happens if I don't transform the data source?
    Writer treats the main form as the unit of output. Any subform records are merged as repeating rows within a single document rather than as separate documents.
  3. Can I change which subform is used later?
    Yes. Clear the existing transformation, then select a different subform or restore the original data source configuration.
  4. Can I use subform fields in merge output settings?
    Yes. After transforming the data source, both main form and subform fields are available when configuring document names, folder paths, and other merge output settings.