Copy link to clipboard
Copied
I am running a form with several calculations.
I have most if not all fields formatted to number, comma separator, $ symbol etc.
I have also added "event.value = util.printf("%,0.2f",event.value);" to round properly.
When the value of any field with "event.value = util.printf("%,0.2f",event.value);" is 1000 or above, I get the error: "The Value entered does not match the format of the field."
Is there any way around this error?
Copy link to clipboard
Copied
util.printf creates a text string with certain characteristics. Forcing a text string with a comma into a field formatted as number is why you are getting the error. What do you mean by "round properly"? Do you want the number to round to 2 decimal places? If so, use this script instead:
event.value=Math.round(event.value*100)/100;