Output unique text to an HTML field based on result of a calc
-
So I want to do the following with this calculation:
(function(){ var values = [fieldname2,fieldname6,fieldname73,fieldname321,fieldname325,fieldname74], total = 0, counter = 0; for(var i in values) { if(values[i]) counter++; total += values[i]; } var result = PREC((counter)?total/counter:0, 1);
If (value>90) then <fieldname1> == “A+”
If (value<=80 && value>=90) then <fieldname1> == “A”I want to output this to an HTML field, but also display this output (A+, A, etc) directly in the calculated field, so I can display it in my e-mail. So far I’ve had to use show/hide logic, but I think it would be easier if I can just display the variable field with the result “A+” or “A” straight to the <block><endblock> rather than repeating it for every possible option.
Thank you
- This topic was modified 8 years, 1 month ago by .
- This topic was modified 8 years, 1 month ago by .
- This topic was modified 8 years, 1 month ago by .
- This topic was modified 8 years, 1 month ago by .
- This topic was modified 8 years, 1 month ago by .
- This topic was modified 8 years, 1 month ago by .
- This topic was modified 8 years, 1 month ago by .
- This topic was modified 8 years, 1 month ago by .
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Output unique text to an HTML field based on result of a calc’ is closed to new replies.