Skip to main content
Solved

Suppress Table Row - Question


Forum|alt.badge.img+2

Hi all,

 

I am building a template and I want to hide certain rows if the value is 0 (like discount, or sub-total) - we are splitting the costs for the customer into recurring and one-time, and they are both not always applying.

In our Suppress Table Row XPATH, we are looking at the field type currency - we want to hide it for all currencies.

Is there an easier way, than what we did, to always hide the field, when the value is 0, instead of using text() and adding the currency symbol like we do currently?

 

Example:

<# <SuppressTableRow Test="count (/Quote/Field1__c [text()!='0,00 €'])=0"/>#>

<# <SuppressTableRow Test="count (/Quote/Field1__c [text()!='0,00 Fr'])=0"/>#>

<# <SuppressTableRow Test="count (/Quote/Field1__c [text()!='0,00 zł'])=0"/>#>

 

I am certain there must be a more efficient way like using CONTAINS (?).

We are quite new to this feature, so any help is appreciated.

 

Thanks!

Best answer by mrave

You could try to use number() instead of contains() and check if the value is 0.

I am not sure, if it cuts off the decimals or not, so maybe it needs to be 0,00.

<# <SuppressTableRow Test=”/Quote/Field1__c [number(text())]=0"/> #>

<# <SuppressTableRow Test=”/Quote/Field1__c [number(text())]=0,00"/> #>

View Original
Is this content helpful?

6 replies

Michael.Rave
Docusign Employee
Forum|alt.badge.img+14
  • Docusign Employee
  • 929 replies
  • February 8, 2024

@Andreas Nextview 

You can use all syntax that is allowed for XPATH, which includes contains().

I have not worked with XPATH and CLM merge tags for a while, so there might be a little syntax error in the below, but the following should work or you are able to take it from here:

<# <SuppressTableRow Test=”/Quote/Field1__c [contains(text(),'0,00')]"/> #>

 


Forum|alt.badge.img+2

Hi,

thanks for your answer.

First of all, this works, however, the row line is also hidden if my value is: 80120,00 € because it contains 0,00. 

Is there a way to fix this?


Michael.Rave
Docusign Employee
Forum|alt.badge.img+14
  • Docusign Employee
  • 929 replies
  • Answer
  • February 8, 2024

You could try to use number() instead of contains() and check if the value is 0.

I am not sure, if it cuts off the decimals or not, so maybe it needs to be 0,00.

<# <SuppressTableRow Test=”/Quote/Field1__c [number(text())]=0"/> #>

<# <SuppressTableRow Test=”/Quote/Field1__c [number(text())]=0,00"/> #>


Forum|alt.badge.img+2

<# <SuppressTableRow Test=”/Quote/Field1__c [number(text())]=0,00"/> #> is throwing TemplateError.XPath Exception: has an invalid token.

Ah, it’s because of your ” which should be ", still throws the same error though.

 

<# <SuppressTableRow Test="/Quote/Field1__c [number(text())]=0"/> #>

Also doesn’t work. Row is still visible. I don’t get it.


Justin Jiang
Digital Collaborator
Forum|alt.badge.img+11
  • Digital Collaborator
  • 205 replies
  • April 25, 2024

is there any support article on this?


Forum|alt.badge.img+2