Skip to main content

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 ctext()!='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!

@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')]"/> #>

 


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?


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 cnumber(text())]=0"/> #>

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


<# <SuppressTableRow Test=”/Quote/Field1__c cnumber(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 inumber(text())]=0"/> #>

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


is there any support article on this?


Hi Justin,

 

there is some:

https://support.docusign.com/s/document-item?language=en_US&bundleId=izj1586134369853&topicId=vqd1589553864435.html&_LANG=enus

https://support.docusign.com/s/document-item?language=en_US&bundleId=izj1586134369853&topicId=zou1626292813473.html&_LANG=enus


Reply