Level 1
Level 2
Sign in to Community
Learn more
Sign in to view all badges
Expand my Community achievements bar.
This conversation has been locked due to inactivity. Please create a new post.
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.
Solved! Go to Solution.
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;
}
View solution in original post
Jono - thank you so very much! That worked like a charm.
I really wish I could pick up some more scripting knowledge!
Gretchen
Views
Likes
Replies