Piped text from a drag and drop response | XM Community
Solved

Piped text from a drag and drop response

  • 1 March 2021
  • 4 replies
  • 837 views

I would like to insert some piped text into a question. The piped text will be the statement that the responder has dragged and dropped into a particular box in previous drag and drop question - I just can't seem to work out how to construct the piped text to reflect this. Any help would be great! I am a complete JavaScript novice!

icon

Best answer by lizb311 11 May 2021, 16:35

View original

4 replies

Userlevel 4
Badge +19

So this will depend a bit on how your drag & drop question is set up, and what exactly you want out of your piped text. With a drag & drop question, you can pipe text based on selected choices, or an item's rank within the group... Does your piped text need to reference items dropped into a specific group, or any group, or...?

In any case, I think the easiest way to do piped text is to let Qualtrics do it for you. If you are piping text into a question, then click on "piped text" when you are editing your question. If you are piping text into an answer choice, then click on the small blue arrow next to the answer choice. Then click on "Insert piped text." Choose to pipe text from a "Survey Question" and then select the question that you're interested in. Here's a screenshot of what that process looks like and what the built-in options are for a drag & drop question.
image.png
Here are some examples of what you'll get.
Item 1 Description: this basically just carries forward the choice text for a given item, and will display regardless of if that item is sorted or not. Your piped text will look like:

${q://QID1/ChoiceDescription/1}

Selected Choices: this will give you ALL items from your drag & drop that were selected, no matter which group(s) they were sorted into. Your piped text will look like:
${q://QID1/ChoiceGroup/SelectedChoices}

Item 1 Rank: the rank of the first item in the drag & drop question, in whatever group it landed in. Your piped text will look like:
${q://QID1/ChoiceNumericEntryValue/Rank/1}

In each of these examples, "Item 1" would correspond to an actual answer choice in your drag & drop question. QID1 is the internal ID for the drag & drop question. This will likely be different for your survey, depending where your drag & drop question is.

https://www.qualtrics.com/community/discussion/comment/35583#Comment_35583Thanks so much for answering! Unfortunately it doesn't solve my problem exactly.
So there will be some statements (e.g. apple, orange, grapes). Participants will drag and drop these into groups (e.g. most favourite, least favourite). Say they drag and drop 'apple' into 'most favourite'.
I will then have a question following asking why they ranked [statement] (in this case, apple) as their most favourite. I'm trying to work out how I pipe text to reflect [statement] in order to remind the participant of what they ranked as favourite when I'm asking them why they ranked that way.
So the Selected Choices is the closest to what I need, but will obviously repeat all of the statements that the participant puts into the groups. I just want to repeat the one statement that was dropped in to the group called 'most favourite'.
Any help would be great!

Userlevel 4
Badge +19

HollyR Oh, I see! Unfortunately I don't know of a great way to pipe text from just items placed in one group in a Pick, Group, & Rank question. The workaround I would try (which is certainly not ideal) would be to create a follow-up multiple choice question on the next page that uses Carry Forward to display only the items that were put into a particular group. Make one of those questions for every group you need - so like one for most favorite, one for least favorite, etc. You can hide those questions - here's a good community post about how to do that with JavaScript. Then on the following page, you can use piped text to show all of the displayed choices from the hidden question.
image.png

https://www.qualtrics.com/community/discussion/comment/37303#Comment_37303Incredible! Thanks so much that works perfectly! :)

Leave a Reply