Skip to main content
Group data when generating documents

Use forms configurations to group data in your document

Karoline Fernezlian avatar
Written by Karoline Fernezlian
Updated over a month ago

When generating a document using Sheetgo you can use smart tags to specify which data from the spreadsheet will populate each part of the document template. You can take this even further by combining the header configuration from the forms to create groups of data that need to populate specific parts of a document. With this feature, you have granular control over how data is grouped and presented in the final document.

To use this functionality your spreadsheet needs a column in the header with the configuration "[default: random]" or "[default: incremental]". When you use the form to submit new data to the spreadsheet this ID will group the data that was submitted together.

You can learn more about the grouped configuration on forms here

In the example above we have an invoice spreadsheet that is populated using the form. In it, we use the [default: random] to generate one unique ID for each time the form is submitted. We want rows with the same ID to populate one single document instead of generating a different document for each row.

Now we need to add new special smart tags to the template document: {{!group-start}} to for the beginning of grouped data and {{!group-end}} for the end. When using these smart tags Sheetgo will recognize that it needs to group rows that have the same ID.

Following from the invoice spreadsheet we will use the smart tags to group the data from the spreadsheet inside a table, where each row will reference the data from a row inside the spreadsheet on the same ID.

The final result will look like this with each row that had the same ID added to the table inside the same document.

Need more help?

Contact us via chat, on our email ([email protected]), or send us a ticket!

Visit our Community for help, tips, tricks, and feedback for Sheetgo.

Did this answer your question?