Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Group of radio button answers selects an outcome

stephenf8734174
Level 3
Level 3

Hi, I have a form with two sets of 'yes/no' questions. Depending on whether there is a 'yes' or 'no' selected within the two sections an outcome (checkbox) is selected. First section is 'was this a predictable event', second is 'was this a preventable event'. There are 7 questions in each section. If yes to any in the first section it is 'predictable' and if yes to any in the second section it is 'preventable'.

Outcomes are 'Predictable & preventable', 'Predictable & not preventable', 'Not predictable & not preventable', and 'Not predictable & preventable'.

I know there are long ways around this, but is there a simpler script for automatically ticking the outcome based on the responses.

Thanks for any help!!

1 Accepted Solution
Niall_O_Donovan
Correct answer by
Level 10
Level 10

Hi,

One option would be to bind a 1/0 value to all of the radio buttons: Yes = 1 and No = 0 (go to the Object > Bind panel).

This way you can have an if/else statement in the calculate event of the checkbox:

If (SUM of predictable group of radio buttons >= 1 AND SUM of preventable group >=1) then set the value of the checkbox to on.

This way if any of the radio buttons in both groups is Yes, the checkbox will be set to ticked.

Hope that helps,

Niall

View solution in original post

0 Replies
Niall_O_Donovan
Correct answer by
Level 10
Level 10

Hi,

One option would be to bind a 1/0 value to all of the radio buttons: Yes = 1 and No = 0 (go to the Object > Bind panel).

This way you can have an if/else statement in the calculate event of the checkbox:

If (SUM of predictable group of radio buttons >= 1 AND SUM of preventable group >=1) then set the value of the checkbox to on.

This way if any of the radio buttons in both groups is Yes, the checkbox will be set to ticked.

Hope that helps,

Niall

View solution in original post

stephenf8734174
Level 3
Level 3

Thanks Niall - after a bit of fiddling (I don't have the greatest coding knowledge) I got it to work based on your advice. Cheers!