Hello zoho community,
I have a little problem importing data using zoho creator.
The form contains fields with decimal values which are to be populated with figures containing a varying number of decimal places.
As an example:
Field “a” may contain
12.2
54.634
3
2.74465674
and so on
The problem is that the formula field has its number of allowed decimal places limited to three.
Of course this would yield an error when importing said data. I thought I could circumvent this issue by using the .round(3) function, but I can’t get it to work.
I tried using
if (input.a != null)
{
input.a = input.a.round(3);
}
in the “on validate” area of the script builder, but I can’t submit the form or import data without getting an error stating the number of decimal places exceeds the number allowed in the field.
The same applies when I try to add the code in the “on user input” section of field a.
Additionally the form seems to get stuck in an infinite loop in this case.
Using an auxiliary variable does not seem to help
temp_a= input.a.round(3);
input.a =temp_a;
I would be happy if you could help.
Regards Michael