Needing script to return a value of 1,2 or 3 when in a certain range
Hello,
My company is doing performance evaluations and I used radio buttons to add up the score based of 15 questions with a score of 1-3 on each question. I got the total working but now they would like a 1,2 or 3 returned if it is within a range. 1-15 will equal 1, 16-30 will equal 2 and 31-45 will equal 3.
I am not familiar with coding and the closest thing i know is some excel formulas. From my research into this online i have the below formula but it keeps coming up with an error that i cannot get around.
Any help would be greatly appreciated.
Thank you
var v1 = this.getField("x") . value;
if (v1 <= 0) {
event.value = ">>>>>";
else if (v1 >= 1 && v1<= 15) {
event.value = "1";
}
else if (v1 >= 16 && v1<= 30) {
event value = "2";
}
else if (v1 >= 31 && <= 45) {
event value = "3";
}
