Side-buy-side - piped text to later question | XM Community
Skip to main content

I have a side-by-side with 9 questions (all 9 will not always be answered), and 7 columns (only care about the first column, “Yes”). I would like to use piped text to carry all “yes” responses from the side-by-side to a later text/graphic ‘question’. 

 

The code ${q://QID650%231/ChoiceGroup/SelectedChoicesForAnswer/1} does work, however I want the text/graphic question to list each “Yes” response question from the side-by-side as bullet points (rather than one long, unreadable list). 

 

Anyone know how to do this? Thank you!

@mep5756 Add this Java-Script to the text/graphic question

Qualtrics.SurveyEngine.addOnReady(function() {
var pipedText = "${q://QID650%231/ChoiceGroup/SelectedChoicesForAnswer/1}";

if (pipedText) {
var items = pipedText.split(",");
var bulletList = "<p>Here's the choices:</p><ul>";
for (var i = 0; i < items.length; i++) {
bulletList += "<li>" + itemssi].trim() + "</li>";
}
bulletList += "</ul>";
jQuery("#"+this.questionId+" .QuestionText").html(bulletList);
}
});

Hope this help


Leave a Reply