Creating rank-and-rate question that carries forward ranked answers | XM Community
Skip to main content

Hi there,

I am trying to create a rank-then-rate question (i.e., display a rank question and then have the ranked factors displayed in a subsequent matrix question whereby participants will rate the importance of each factor, presented in the order they ranked them in).

I think there is a way to do this using capture ranks? However I am unsure how to do this. 

Here is the question I am trying to edit.

Would anyone be able to walk me through how to do this? I would be grateful for any insights.

 

Thanks, 

 

Elli

@ellik 

There could be a easier route via JavaScript as Qualtrics doesn’t provides the question text to each rank value directly. Use below code and include embedded data rank1 to rank12 in the question you require the values it will be in the order they selected it in. 

Qualtrics.SurveyEngine.addOnReady(function() {
var qid = this.questionId;

function updateAndLogRanks() {
var ranks = s];
jQuery("#" + qid + " .ui-sortable-handle span.label").each(function(index) {
var rankValue = jQuery(this).text();
ranks.push(rankValue);
Qualtrics.SurveyEngine.setEmbeddedData("rank" + (index + 1), rankValue);

});
}
jQuery("#" + qid).on('mouseup sortupdate input', function() {
setTimeout(updateAndLogRanks, 100);
});
});


Hope it helps!

 


Thanks @Deepak.

Where do we add the below code? Do we have to make any adjustments to it.

Also, can you explain what you mean by embedded data and how to add this?

Thank you so much! 

Elli


@ellik In left pane you must have JavaScript written open and paste this code in rank type question there, it would look like this.

Then go to your choices and pipe embedded data like this from rank1 to rank12. Create these embedded data in survey flow as well and keep the value empty. Also have page break between 2 questions.

Hope it helps!


Thank you so much Deepak! This worked! I am very grateful and appreciate your time on this. 

Just thought I’d check- is this what the survey flow should look like?

Thanks again! :)


@ellik

You don't need to create the second set of elements those will be in your actual question and not in survey flow.

Also kindly accept the answer if it worked for you 


Leave a Reply