Looking through this forum, I've seen a few similar (but more complicated) questions, with answers that say you need to use JavaScript and embedded data. For example, this question includes some suggested JavaScript: https://www.qualtrics.com/community/discussion/5880/how-to-pipe-answers-that-are-not-highestvalue-or-lowestvalue-from-a-rank-order-question ...but it doesn't say what to do after pasting that in. I've read through the Qualtrics documentation for embedded data but that only tells you how to create embedded data elements, not how to use them to save data from one question and pipe it into another.
What type of rank order question are you using?
> I'm using a Drag and Drop rank order.
If you use a Drag and Drop, you'll need to use JavaScript to put the choices in rank order. Pipe all the choices and ranks into your follow-up question, then rearrange the choices based on the ranks.
You can avoid JavaScript if you use a Text Box Rank Order question and set the default answers to the ranks in the first question.
> Drag and Drop is ideal for our needs. Do you know where I can find the syntax for piping the choices and ranks (if I keep the Drag and Drop option)? I'm pretty new at this, and I'm happy to read through documentation, but I can't find this information anywhere.
The best way to find the piping syntax is to go to the question text of the follow-up question, click on Piped Text.. and choose the appropriate fields from the first rank order question.
What about Bob
Ghostbusters
Groundhog Day
Caddyshack
...and the participant ranks them in this order:
Ghostbusters
Groundhog Day
What about Bob
Caddyshack
When creating the answer choices for Question 2, I can make the first one: ${q://QID1/ChoiceGroup/ChoiceWithLowestValue} and it will correctly display Ghostbusters in the first position (similarly, I can use Highest to put the Caddyshack in the last position). However, those are the only Piped Text options I see, and I need to know how to Pipe in the remaining options (ranked 2, 3, etc.) in the correct positions.
> I don't see any options that me to pipe in items based on their previous rankings, aside from the highest and lowest. For example, in Question 1, say the participant is given these items:
>
> What about Bob
> Ghostbusters
> Groundhog Day
> Caddyshack
>
> ...and the participant ranks them in this order:
> Ghostbusters
> Groundhog Day
> What about Bob
> Caddyshack
>
> When creating the answer choices for Question 2, I can make the first one: ${q://QID1/ChoiceGroup/ChoiceWithLowestValue} and it will correctly display Ghostbusters in the first position (similarly, I can use Highest to put the Caddyshack in the last position). However, those are the only Piped Text options I see, and I need to know how to Pipe in the remaining options (ranked 2, 3, etc.) in the correct positions.
To pipe the ranks, pick the choices' values (the items after choices' descriptions in the drop down). Once piped, they will look something like: ${q://QID1/ChoiceNumericEntryValue/1}
> Unfortunately, that doesn't do it. That just displays a number.
The numbers are the ranks. You would pipe them into JavaScript and use them to reorder the choices.
> Ok, that sounds great... so what I'm looking for is the syntax to pipe them into Javascript (to make them appear in that order in the next question).
You're looking for JavaScript code. You need to write it or have someone write it for you.
> I'm trying to write it myself, and I know some basic JavaScript (and several other programming languages, so I am comfortable with creating and sorting arrays and such). But what I don't know is the syntax for using JavaScript to pipe responses from a Qualtrics question, or the syntax for piping JavaScript back out into the answers for a Qualtrics question. I can't find any documentation on this.
>
Put the pipe string in quotes in the JS. For example:
```
var myVar = "${e://Field/myVar}";
```
Hi Melly82, I'm looking for the exact same thing as you were back then. I'm not familiar with Java Script, but do you maybe have the code you used that I could have a look at and adjust to my needs?
I too am now looking for this - does anyone have some example code?
thanks
Neil
Tom, that looks like it could help - I’ll give it a try - and if I can’t get it to work - I’ll be in touch :-)
thank you!!!
Are there any free resources on using this with a Text Entry rank order question format? (Considering this is a Community and not a professional consulting/tech service, I’m not looking to pay for potentially public knowledge.)
I have ~20 items and am asking people to rank up to 5, with follow-up questions referring only to the items ranked 1st and 2nd, which I’d like to pipe into the static text appearing above the follow-up questions to keep them in respondents’ mind. I’m using Survey Flow to create embedded data fields for RankedFirst and RankedSecond (ignoring the rest of the rankings given, if any).
The item ranked 1st can be taken care of with ChoiceWithLowestValue text piping in Survey Flow, and I’m trying to avoid writing 19 conditional statements for the remaining items just to capture whatever was ranked 2nd (not necessarily ChoiceWithHighestValue).
Thanks!
Are there any free resources on using this with a Text Entry rank order question format? (Considering this is a Community and not a professional consulting/tech service, I’m not looking to pay for potentially public knowledge.)
I have ~20 items and am asking people to rank up to 5, with follow-up questions referring only to the items ranked 1st and 2nd, which I’d like to pipe into the static text appearing above the follow-up questions to keep them in respondents’ mind. I’m using Survey Flow to create embedded data fields for RankedFirst and RankedSecond (ignoring the rest of the rankings given, if any).
The item ranked 1st can be taken care of with ChoiceWithLowestValue text piping in Survey Flow, and I’m trying to avoid writing 19 conditional statements for the remaining items just to capture whatever was ranked 2nd (not necessarily ChoiceWithHighestValue).
Thanks!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.