Solved
PGR - How to display selections in pairs "QID7_0_GROUP - SelectedChoice"
I'm trying to set up email trigger for the survey. I'm using Pick, Group and Rank (PGR) type of question. There are 5 groups and 54 items. Students select 1 item for each group. I would like to display group labels (Preference One, Preference Two, Preference Three, Preference Four, Preference Five) and selection made in the corresponding group in the "Preferences Submission Confirmation" email. I can display the selected choices ${q://QID7/ChoiceGroup/SelectedChoices}, but they are not displayed in the correct order. I can't find a way to show it in pairs: Label:Preference One - corresponding selection. Could you, please, advise on how to do this? Thank you in advance. Svetlana
Best answer by Anonymous
Hello @rychkova ,
I hope you have set the validation type of PGR as "Each Group Contains" -> At least "1" -> No more than "1" , So that the student can only put one item in each group.
Step 1: Add five embedded data (eg: Group1, Group2,Group3, Group4,Group5 ) in the survey flow before the Pick, group, Rank question
Step 2: Add the following js in the js(OnUnload) of the pick group rank question
var group1=jQuery("#" +this.questionId+"group0 li label" ).text();
var group2=jQuery("#" +this.questionId+"group1 li label" ).text();
var group3=jQuery("#" +this.questionId+"group2 li label" ).text();
var group4=jQuery("#" +this.questionId+"group3 li label" ).text();
var group5=jQuery("#" +this.questionId+"group4 li label" ).text();
Qualtrics.SurveyEngine.setEmbeddedData( 'Group1', group1 );
Qualtrics.SurveyEngine.setEmbeddedData( 'Group2', group2 );
Qualtrics.SurveyEngine.setEmbeddedData( 'Group3', group3 );
Qualtrics.SurveyEngine.setEmbeddedData( 'Group4', group4);
Qualtrics.SurveyEngine.setEmbeddedData( 'Group5', group5);
Step3: Use the embedded data (eg: Group1, Group2,Group3, Group4,Group5) wherever required in the survey
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

