Datatype Error Driving Me Nuts!
Hello. I'm brand new to Zoho and Creator, so forgive me.
I'm attempting to port over an excel spreadsheet into a Zoho Creator application. In setting up my form, I'm attempting to calculate a value based on two other values in my form.
Paid_Miles -> Number, Required, default value = 0
Actual_Miles -> Number, Required, default value = 0
Variance -> Formula
Here's my formula:
- if((Actual_Miles > 0),((100 - (100 * (Paid_Miles / Actual_Miles))) / 100),0)
This is supposed to check if Actual_Miles is zero so as to avoid any divide by zero issues. If it is greater than zero, then calculate difference between Paid_Miles and Actual_Miles expressed in a percentage.
When I try to complete the field, I get an error:
"E
rror in statement at line number 0
Both the expression should have same datatype"
I can get this to work without the conditional check, but shouldn't I make sure there won't be any divide by zero issues?