Group of radio button answers selects an outcome

Avatar

Avatar
Validate 1
Level 1
stephenf8734174
Level 1

Like

1 like

Total Posts

45 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
stephenf8734174
Level 1

Like

1 like

Total Posts

45 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile
stephenf8734174
Level 1

05-02-2017

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!!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 10
Niall_O_Donovan
Level 10

Likes

646 likes

Total Posts

4,352 posts

Correct reply

786 solutions
Top badges earned
Validate 1
Boost 500
Boost 50
Boost 5
Boost 3
View profile
Niall_O_Donovan
Level 10

22-02-2017

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

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 1
stephenf8734174
Level 1

Like

1 like

Total Posts

45 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 1
stephenf8734174
Level 1

Like

1 like

Total Posts

45 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
Applaud 5
View profile
stephenf8734174
Level 1

28-02-2017

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!