Localized IF function
-
I have looked through the support questions and haven’t found one that matches this description completely, although many come close.
I am trying to recreate the NFL passer rating calculator, wherein the four main variables are capped at 0 min and 2.375 max.
I need something to the effect of IF(fieldname70 >= 2.375,2.375)
If(fieldname70 <= 2.375,fieldname70)I have seen this format:
(function(){
if(fieldname70 >= 2.375) return 2.375;
if(fieldname70 <= 2.375) return fieldname2;
else return fieldname2;
})()However, I don’t want the rule to apply to every form I create that happens to have a fieldname70 in it. I need to apply it specifically to one form.
Plus, I tried the above code and created a fatal error, so I might be doing something wrong entirely.
Your help is appreciated.
https://www.ads-software.com/plugins/calculated-fields-form/
- The topic ‘Localized IF function’ is closed to new replies.