Make field dependent on total number of radio buttons input variable.
On the PDF form I have created I would like to create the following functionality.
- If all standards (1.1.1, 1.1.2, 1.1.3) are "meeting" then standard 1.1 rating is "Meeting Standard "
- If any standards (1.1.1, 1.1.2, 1.1.3) are "working towards" then standard 1.1 rating is "Working Towards Standard"
- If no criteria selected then "Not Yet Rated" is displayed.
I have followed these steps to achieve this but the calculation is not performing correctly.

- I have set radio buttons fields "1.1.1, 1.1.2, 1.1.3" to = 1 for Meeting and = 0 for Working towards.
- I have created a tally "1.1 Tally" that sums these (working correctly - displays 1,2,3 as the 3 Meeting boxes are selected - counts back down if changed to working towards)
- I have added a calculation to field "Rating 1.1"
var Tally = this.getField("1.1 Tally").value;
if (Tally == 3) {
event.value = "Meeting Standard";
}
else if ((Tally <= 3) && (Tally >= 0)) {
event.value = "Working Towards";
}
else {
event.value = "Not Yet Rated";
}
However - I get the following results (the Tally field e.g. 3/3 is always correct)
1 x Working and 2 x Meeting = Meeting Standard (incorrect)

3 x Meeting = Working Towards (incorrect)

2 x Working 1 x Meeting = Working Towards (correct!)

Please, can someone help me understand my error? I have never used Javascript before ![]()
Thank you
