jscript function to use drop down field in calculation
-
Hi
I am new to javascript and the cff plugin. I need to write a function in a calculation that uses 5 options from a drop-down list to calculate 5 possible results. I have tried the following, but it always calculates only the first option regardless of which drop down is selected. Please can you help correct the equation?(function () {
var result=0; reference = fieldname31;
if (reference =’Sedentary’) result += fieldname4*1.2;
else if (reference =’Mild’) result += fieldname4*1.3-1.375;
else if (reference =’Moderate’) result += fieldname4*1.5-1.55;
else if (reference =’Heavy’) result += fieldname4*1.7;
else if (reference =’Extreme’) result += fieldname4*1.9;return result;
})();
- The topic ‘jscript function to use drop down field in calculation’ is closed to new replies.