Piping text into a later question from a randomly presented statement in an earlier matrix table | XM Community
Skip to main content

Hi everyone, I have a bit of a convoluted question with some different moving parts, but in short, I want to pipe a randomly presented statement from a previous question (matrix table) into the question wording of a later question.

  • First, I have a multiple choice question where we present respondents with a list of activities and ask them to indicate which ones, if any, they have participated in over the last 12 months (select all that apply)

  • Next, of all the activities selected by respondents, I then want to randomly present a maximum of 2 chosen activities so respondents can then indicate whether they participated alone or with friends/family/children. To do this, I created a matrix table that carries forward the selected activities from the previous question and applies advanced randomization to show respondents a random selection of 2 of the selected activities as statements in the matrix table. So far so good.

The trouble I am having is that I want to ask a third question, which will take the same randomly presented activities from the second question and then ask a series of Yes/No questions in another matrix table to measure program effectiveness.
The idea here was to use piped text to insert the name of the target activity (which is randomly presented in the second question, after being carried-forward and randomly shown from the first question), into the question wording of a third question, but I cannot seem to get a clear idea of how to pipe the randomly presented activity from the second question into the third. I can pipe the activity names, but I do not seem to be able to control specifically the pipping of the randomly presented activity from the second question, so I end up with potentially different activities being asked in the third and second question.
Perhaps pipped text is not the way to go, but that seems the clearest way to me. I’m open to any other suggestions. I suspect this may somehow be possible with JavaScript, but I am not sure how to set that up properly.
Thanks for your time.

https://community.qualtrics.com/XMcommunity/discussion/23508/piping-text-into-a-later-question-from-a-randomly-presented-statement-in-an-earlier-matrix-tableIf you just want the question text forwarded for the third statement use carry forward choices again but this time use displayed choices rather than selected choices from the second question.
Hope it helps!


ColinScott42
Hi
You can create a temp question:

  1. Add all the possible statements as an option.

  2. Now put display logic on each statement.

  3. Using randomization you can set only 2 statements to be shown randomly.

  4. Hide this question using below JS, Just past it directly into this temp question.

  5. Now you can pipe in "displayed choice" statement from this temp question to you desired question.

Try this or we can connect on messages if you want.

Qualtrics.SurveyEngine.addOnload(function()
{
   /*Place your JavaScript here to run when the page loads*/
   jQuery("#"+this.questionId).hide();
});
Qualtrics.SurveyEngine.addOnReady(function()
{
      jQuery(".MultipleAnswer").not( ".q-checked" ).click();
      console.log(jQuery(this))
      jQuery("#NextButton").click();
});
image.png
image.pngimage.png


Leave a Reply