


Is there a way to make a calculation of two fields not calculate until the 3rd field is reached. I have a calculation that takes (field1/field2)*100. Once the user puts in field1, it throws a script error, which is annoying. Anyway around this???
Thanks for your help.
Views
Replies
Sign in to like this content
Total Likes
You need to test to make sure there is a value in the fields first.
Using FormCalc:
if (HasValue(field1) and HasValue(field2)) then
$ = field1 / field2 * 100
endif
Or JavaScript:
if (!field1.isNull && !field2.isNull) {
this.rawValue = field1.rawValue / field2.rawValue * 100;
}
Views
Replies
Sign in to like this content
Total Likes
You need to test to make sure there is a value in the fields first.
Using FormCalc:
if (HasValue(field1) and HasValue(field2)) then
$ = field1 / field2 * 100
endif
Or JavaScript:
if (!field1.isNull && !field2.isNull) {
this.rawValue = field1.rawValue / field2.rawValue * 100;
}
Views
Replies
Sign in to like this content
Total Likes
Jono - thank you so very much! That worked like a charm.
I really wish I could pick up some more scripting knowledge!
Gretchen
Views
Replies
Sign in to like this content
Total Likes