Skip to main content

Hi everyone,

I’m trying to sum the values from a table column using XPath in a DocuSign CLM document.
I already know that this works: <# <Content Select="(sum(//Valor_Por_Data))" /> #>

 

However, the sum result only works if the numbers are in the format: 00000.00

(no thousands separator, and with a dot . instead of a comma , as the decimal separator).

The issue is that this is not our standard number format — we normally use a thousands separator and a comma for decimals (e.g., 12.345,67).

Is there a way to perform the sum directly with our local number format, or do I need to convert the values before summing them?

Thanks in advance!

Hello ​@rodvillani 

Welcome to the DocuSign Community!

You are absolutely right — the sum() function in XPath expects numbers to be in a specific format: no thousands separator, and using a dot (.) as the decimal separator.

Since your standard format uses a thousands separator (.) and a comma (,) for decimals (e.g., 12.345,67), XPath will not recognize these as valid numbers and will not sum them correctly.

Solution:

Yes, you need to convert the values to a valid numeric format before summing.

Unfortunately, XPath 1.0 (used by DocuSign CLM) does not support advanced string manipulation or locale-aware number parsing.
Or better handle it in Workflow.

Thanks!

👪 DocuSign Community Leaderboard Top 5 contributor
💹 Ranked #3 in the Reply Royalty category in DocuSign Community Wrapped 2024
🤝Let’s LinkedIn and rollPawan Gangwani - EY | LinkedIn


Thanks for your help, ​@Pawan Gangwani!


Reply