I have a survey where we ask a question “Tell us all the reasons that you purchased Brand A. Select all that apply” and have a listing of around 10 items with an other category with an open ended response box. This is of course a checkbox question.
We then ask a follow on question “Tell us the primary reason that you purchased Brand A” and only list the items from the first question that we selected. This is of course a radio button question.
Mary, thank you for the note about Get and Set actions, I don’t know why I did not think of going in that direction. I also found an action called sgapiCheckboxTotalChecked that I can use to check the number of items selected in the first question and then if it is equal to 1 run through the various answers in the second question to Set the one item that was in the first question using spapiSetValue.
Works perfectly so thank you for getting my head to think the proper way.
The easiest fix would be to flip the order of your two questions. First ask the radio button question then on the next page ask the check box. To set the answer in the second question, use a merge code of question 1 in the “Default Answer:” under the “Layout Tab”.
If you want to keep your order as is, you code do this with some custom scripting. Do you or anyone on your team have some experience with coding? You could do an If/then statement and a sgapiget/sgapiset. Here is the scripting library: https://script.surveygizmo.com/help