Skip to main content
New Voice
May 15, 2026
Question

What is the correct syntax to sort a TableRow by two fields in DocuSign Gen?

I am trying to sort my OpportunityLineItems by two fields in a word template for Gen.I wanted to sort by Recurring_Product__c and then by UnitPrice. No matter what I try i keep getting errors. This is my current tag: 

<# <TableRow Select="./OpportunityLineItems" OrderBy="Recurring_Product__c ASC, UnitPrice ASC"/> #>

Which produces the OrderBy attribute is not declared. 

Any help is appreciated. 

2 replies

New Voice
October 15, 2026

Hi ​@etemkin1 Were you able to find a solution to this issue? If so, would you mind sharing it? I'm currently facing the same situation and would greatly appreciate any guidance.

Thank you in advance.

 

Translate
etemkin1New VoiceAuthor
New Voice
October 16, 2026

Yes, within Docusign Gen Template, you need to find the table you want to sort by (for me it was Opportunity Products). Click the carrot next to copy and select Options.  Then put in the fields you want to sort by separated by commas under SOQL Sorting (ORDER BY). 

This was what mine looks like and seems to work: ProductCode ASC, ListPrice ASC

Translate