Add display logic to that question such that - show if two or more option visible.
Now in survey flow add an embedded data that will store the response of this question if that was displayed else store the one option that was displayed
If it is a multiple choice question, you can use the following. It has the advantage of the question being answered in the response data.
https://gist.github.com/marketinview/8310ba82acde38be62f007095bbe0278
The code TomG shared worked perfectly for me!
Some advice for those who don't know javascript, like myself:
Change the 'true' in this line to match whatever saved answer you're looking for.
qobj.setChoiceValue(displayedChoices[0], true)
I had a constant sum question for my follow-up question, so I changed it to this:
qobj.setChoiceValue(displayedChoices[0], 100)
https://community.qualtrics.com/XMcommunity/discussion/comment/23423#Comment_23423Thanks TomG - Solved it for me as well. Almost two years later! :)
If anyone is interested I have a more advanced function called skipFollowUp that serves the same purpose, but it works with multiple question types (MC, constant sum, constant sum slider, rank order, and PGR with one group), handles hiding the question so it doesn't flash on the screen, and addresses hiding the previous button on the next page.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.