How do I access the responses from previous questions in Qualtrics

余生长醉 提交于 2019-12-01 11:23:24

问题


I have a survey where I'd like to pull the output from a "Pick Group and Rank" list for use in a second question. We need both the items and the ranking. The operation in the second stage is a complicated set of random pairwise comparisons, and the base Qualtrics functionality isn't flexible enough to do it.

I have looked through the Qualtrics Javascript API and I assume one of the getChoices* functions is what I want, but I don't know how to reference the previous question.

Thanks for any help!


回答1:


EDITED answer based on comment:

You can only access things (questions) on the same page with JavaScript. I'm assuming your questions are on different pages (otherwise it would be a real mess). So you can't access the answer to the first question with getChoices(). You could pipe the answers from the pick/group/rank into the second question, but it would be difficult to make effective use of them at that point.

A better way is to send all the pick/group/rank piped variables (items and rankings) to a web service script and have it sort the items by ranking. This is how I always do it.

You pipe the pick/group/rank variables into the parameters of your web service call. Since in this case you are dealing with pairs (the description and the rank), you probably want to make them one parameter with a delimeter that your web service script can use, such as:

answer1 = ${q://QID1/ChoiceDescription/1}~${q://QID1/ChoiceNumericEntryValue/Rank/1}
answer2 = ${q://QID1/ChoiceDescription/2}~${q://QID1/ChoiceNumericEntryValue/Rank/2}
etc...


来源:https://stackoverflow.com/questions/43190723/how-do-i-access-the-responses-from-previous-questions-in-qualtrics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!