Skip to main content
Conversation Starter
February 8, 2024
Solved

Suppress Table Row - Question

  • February 8, 2024
  • 6 replies
  • 947 views

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 Michael.Rave

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"/> #>

6 replies

Michael.Rave
Docusign Employee
Docusign Employee
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')]"/> #>

 

"Select as Best" below if you find my answer is a valid solution to your issue and mark it as resolved.
Conversation Starter
February 8, 2024

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
Docusign Employee
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"/> #>

"Select as Best" below if you find my answer is a valid solution to your issue and mark it as resolved.
Conversation Starter
February 8, 2024

<# <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
Established Contributor
Established Contributor
April 25, 2024

is there any support article on this?

Welcome to the DocuSign Community and University! Your feedback is immensely appreciated. If this answer resolves your issue, please feel free to give it a Like and mark it as the "Best Answer". This helps others in the community find the information they need. Visit us at http://dsucustomers.docusign.com for more resources and support.