Need help with a rank order question | XM Community
Skip to main content
Hi! I'm trying to use a Rank Order question where the respondent would rank up to three responses. These responses are pulled forward from the prior multiple-choice question. Since we don't want to require all 3 responses, though, has anyone found way to automatically code a response as 1 if only one response was pulled forward?



Thanks!



1. Which, if any, of the following ways has your business benefited? ACCEPT MULTIPLE



I was able to build trust

I was able to develop a closer relationship

I was able to better learn what my client wants so I can better service them

I was able to adjust the way I contact my client based on their preference

The program gives me a reason to reach out to my client



2. Now, we would like you to rank your top three benefits from inTouch. Please give a “1” to the most important reason, a “2” to the 2nd most important reason, and a “3” to the third. RANK TOP 3.



INSERT MENTIONS FROM Q1
Yes, you can do it with JavaScript. This topic was covered in another recent post: https://qualtrics.com/community/discussion/comment/1189
Sorry, follow-up question: how do I know what the choiceID is? I understand the concept in your solution (When they reach the page, check to see if the number of answers is 1, if it is automatically select the answer and click the next button), but I'm having trouble figuring out how to automatically select the right answer.
@mattv,



You don't really need or care about the choiceID. If there is only one choice, just set the value of that one choice. For example:

```

var choices = this.getChoices();

if(choices.length == 1) this.setChoiceValue(choices[0], 1);

```
Thanks a lot!

Leave a Reply