Hi folks! :) | XM Community
Skip to main content

I am coding a survey where I ask respondents to rank certain options in one question. In the follow up question, I want to carry forward the top 5 ranked statements.
Can someone please help me out with this, since I have to launch the final survey on a urgent timeline

You might be interested in this.


Hi TomG
Thanks for the shared link.
With respect to this question we have a further update.
So basically we have a 'constant sum' type question where the respondent inputs value against the option statements.
In the next question, we want to carry forward the top 5 ranked statements based on the values from the previous question.
It'd be really great, if you have a solution to this. Would be really thankful :)


https://community.qualtrics.com/XMcommunity/discussion/comment/48255#Comment_48255You could write JS to sort the statements by value then set embedded data flags that could be used in display logic on the next question.
You'll need to decide what to do if fewer than 5 statements have non-zero values or if there is a tie for 5th place.


Can you please share the JS to sort the statements and set embedded data flags. Would be great if you can give a step by step explanation, since I'm a qualtrics rookie(pardon for that)

For your second question, if there are fewer than 5 statements with non zero values, we carry those statements with non zero values only. Also, if there is a tie for the fifth place, then pick all the statements with tied values


Leave a Reply