Skip to main content
Question

Controlling Duplicate Rows in DocuSign Doc Gen Table (Group by Brand)

  • March 30, 2026
  • 2 replies
  • 21 views

Forum|alt.badge.img

I’m looking for guidance on how to control the rows displayed within a table in a DocuSign Doc Gen template generated from Salesforce data.

Current Behavior:
Our Salesforce data structure allows for multiple records per Brand (for example, multiple “Caldera” records with the same service type). When the document is generated, each individual record is rendered as its own row in the table.

Desired Outcome:
We would like to display only a single row per Brand in the generated document, even when multiple Salesforce records exist for that Brand.

Question:
Is there a supported way within DocuSign Doc Gen to group, deduplicate, or otherwise control the dataset so that only one row per Brand is rendered in the table?

2 replies

Forum|alt.badge.img+15
  • Community Moderator
  • April 1, 2026

Hello ​@rschopper,

Thanks for reaching out, and welcome to the Docusign Community!

DocuSign Gen doesn’t have a native way to deduplicate rows; there’s no “collapse” or SELECT DISTINCT function, even with Salesforce SOQL. If Salesforce sends five records, Gen will render five rows.

You may consider trying to use a Group tag instead of TableRow. Tablerow tags will produce one row per record we find in a related list. Whereas a Group tag will attempt to group related list records by certain data, and if a tablerow table isn't found within the group tags, then the system will only grab the first record it finds, ignoring the others. In other words, while Gen can't deduplicate rows inside a standard table, it does have a grouping function. You can group the records by Brand, output the name of the Brand once per group, and simply choose not to render the individual records inside that group.
Instead of using <TableRow ...>, you would wrap a one-row table in Group tags, grouping by their Brand field.
<# <Group Select="/Parent_Object__c//Child_Records__r" By="./Brand__c" /> #>
[  <# <Content Select="./GroupName" /> #>  ]  <-- Imagine this is a 1-row Word table with that Content tag in the singular table row.
<# <EndGroup/> #>

The <Group> tag identifies all unique Brands. The <Content Select="./GroupName" /> tag outputs the unique value (the Brand) that the group is based on. By deliberately leaving out the <TableRow Select="./GroupItems/Item" /> tag, the duplicate child records are completely ignored.

The <Group> tag is designed to repeat entire blocks of text or whole tables, not individual rows within a static table. If you put a one-row table inside a <Group> tag, Gen generates a new, separate one-row table for every Brand. If you format the Word document perfectly with zero paragraph spaces between the tags, Microsoft Word will usually "snap" and merge these individual tables together into what looks like one contiguous table. However, it can be very finicky to set up and format correctly.

I hope this helps. If you believe this response effectively addresses your question, please mark it as “Best Answer” to help other users with similar questions locate it more easily. Should you require any additional assistance, feel free to reach out. Thank you!

 

Best Regards,

Jenny | Docusign Community Moderator

If this helped, feel free to click "Best Answer"!


Forum|alt.badge.img+15
  • Community Moderator
  • April 9, 2026

Hello ​@rschopper,

I hope you're doing well. I'm following up on the solution provided above. Could you please confirm whether it addresses your question? If it did, can you please mark it as Best Answer ✅" to assist other users with similar inquiries and improve its visibility. Let us know if we can help with anything else. Wishing you a smooth rest of your day! 

 

Regards,

Jenny | Docusign Community Moderator

If this helped, feel free to click "Best Answer"!