How to record data of the order in which randomizer presents items in group, pick, rank? | XM Community
Solved

How to record data of the order in which randomizer presents items in group, pick, rank?

  • 11 December 2023
  • 4 replies
  • 57 views

Userlevel 1
Badge +2

Hi all,

I have a question using the group, pick, rank format and the items presented are randomized. I need to capture the initial order in which these items are presented before a participants moves them into a group. I know how to grab the participant’s answers but I’m not sure what the code for capturing the items will be. Can someone please help? Thank you.

icon

Best answer by Deepak 11 December 2023, 19:37

View original

4 replies

Userlevel 7
Badge +36

@44RK44 

You can include below code and it will give you comma seperated values in combinedRankings embedded data. Create embedded data in survey flow.

Qualtrics.SurveyEngine.addOnReady(function() {
var questionId = this.questionId;
var embeddedDataValues = jQuery('#' + questionId + ' .Items label').map(function() {
return jQuery(this).text().trim();
}).get().join(', ');

Qualtrics.SurveyEngine.setEmbeddedData('combinedRankings', embeddedDataValues);
});


 

Userlevel 1
Badge +2

This is perfect. Thank you for your help.

Userlevel 6
Badge +23

Just used the above - thank you! 

Badge +2

How do we capture the participant’s answers in the rank they provided? When I try it gives it randomly, but I want to use the embedded data in the order they ranked. 

Leave a Reply