Copy link to clipboard
Copied
Hi
I have a problem with a calculated field in a adobe document that works in the adobe app but not when the document is opened in Google Chrome.
I seems like when the adobe document is opened in Google Chrome and I start to fill out the fields with a number with comma the calculated field thinks the number 10,00 is 100. When I open the document ind Adobe it works perfectly fine.
I have tried the custom format script event.value "= event.value.replace(",",".");" I found in another subject.
Can anyone help with this?
Copy link to clipboard
Copied
Browsers may not support scripts.
Copy link to clipboard
Copied
The calculated field works in the browser but it is reading the number wrong when number contains a comma.
Copy link to clipboard
Copied
Try changing separator style (dot as decimal, not comma).
When you set field format as Number under 'Separator style' select first option.
Copy link to clipboard
Copied
It calculated field works dot. However in Denmark we use comma to separate numbers. Is it possible write scprit that convert det comma to a dot so the calculated field is calculated correct?
Copy link to clipboard
Copied
You can try this workaround, use this as validate script:
var str = event.value;
if(str) {
str = str.replace(",", ".");
event.value = str;}
If you enter a number like this 10,5 it will convert the actual value to 10.5, then use this as custom format script to show comma as decimal and dot as a thousand separator while actual value will remain with dot as decimal separator:
var n = event.value;
if(n)
event.value = util.printf("%2.2f", n);
Copy link to clipboard
Copied
Hmm cant get the workaround to work 😞 but I can read that others have similiar problems calculated fields when filling documents in a browser.
Thank you for your effort.
Copy link to clipboard
Copied
Like was said, browser plugins have very poor support for scripts.