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

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

  • December 11, 2023
  • 4 replies
  • 105 views

Forum|alt.badge.img+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.

Best answer by Deepak

@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);
});


 

View original

4 replies

Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+44
  • 1549 replies
  • Answer
  • December 11, 2023

@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);
});


 


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 6 replies
  • December 15, 2023

This is perfect. Thank you for your help.


Forum|alt.badge.img+32
  • Level 6 ●●●●●●
  • 241 replies
  • January 7, 2024

Just used the above - thank you! 


Forum|alt.badge.img+2
  • Level 1 ●
  • 6 replies
  • January 24, 2024

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