Not finding the problem with this:
if (NumericField2.rawValue*0.02 <100) {TotalAmount.rawValue=100;}
if (NumericField2.rawValue*0.02>1000) {TotalAmount.rawValue=1000;}
if (NumericField2.rawValue*0.02 >100 and <1000 {TotalAmount.rawValue=NumericField2*0.02;}
Views
Replies
Total Likes
What error are you getting?
One thing I noticed right away was that the and logic is performed with "&&".
Views
Replies
Total Likes
I do not get an error in my script editor but when I enter the values in the form, it puts nothing into the TotalAmount field when my amount is between 100 and 1000
Views
Replies
Total Likes
Oh sorry, you're using formcalc right?
For each if statement you need a then after your condition.
For exampple:
if (NumericField2.rawValue*0.02 <100) then
TotalAmount.rawValue=100
Views
Replies
Total Likes
Make sure it's in JavaScript and change line 3 to:
if (NumericField2.rawValue*0.02 >100 && NumericField2.rawValue*0.02<1000)
Kyle
Views
Replies
Total Likes
That nailed it, thanks so much!
Views
Replies
Total Likes
Thank you so much for the help
Views
Replies
Total Likes
Views
Likes
Replies