Are there any built in functions that provide number formatting? We are looking to format with parenthesis for negative numbers and commas.
Thanks in advance,
Eric
Are there any built in functions that provide number formatting? We are looking to format with parenthesis for negative numbers and commas.
Thanks in advance,
Eric
Hi Eric
in workflow You can use Query XML action to format numbers, e.g.
As You see You can also do calculations. The first pattern will be used for positive numbers and the second for negative numbers. Pattern separator is ';'.
Kind regards
Manfred
Hi Manfred,
Looks like it will do the job. It isn't working for me when I use references though. Here's the configuration.
I get NaN as the result though. Any ideas?
Thanks again,
Eric Halsey
Hi Eric,
Are you using the Run Now function and seeing this "NaN" value? This will happen because your variable will not be parsed correctly when using the Run Now function. If you publish the workflow and run it live, it should work fine if that is the root of the problem.
Thanks,
Mike
Hi Mike,
When I tested using run now I replaced the token with an actual value and it worked as expected. I get the NaN when the workflow is executed. I'm wondering if anyone has used it like I did, with the token, or if they were just using numeric literals in the XML.
Regards,
Eric
Hi Eric
what type of variable You have used for input numbers? What numbers have You used in test?
Please note that format-number is designed to take an "international format" number as input,i.e decimal-separator has to be '.'.
Kind regards
Manfred
It is a number field.
Nan refers to "Not a number" so you'll get this error whenever it detects any text that is not a number. This could include things such as "," if it is being treated as a string rather than a decimal number.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.