Advanced piped text function | XM Community
Skip to main content

Hello friends!

I am trying to use a function or a code on Qualtrics that allows me to select the strongest option (in this case punishment) from previous question to be reflected in the next open-ended question. This is the example:

Q1. Please select what response you would take in this situation (you can select as many options you want).

  1. Do not do anything 
  2. Tell them to stop nicely
  3. Tell them to stop firmly
  4. Tell the teacher
  5. Call the police

Q2. Why did you choose to (...)? Please explain why.

 

As you can see in Q1, 1 is the weakest option and 5 is the strongest option. In Q2, I would like (...) to reflect the strongest option. For example, if a participant chose 1 and 2, I would like 2 to be reflected in (...). If the participant chose 2,4, and 5, I would like 5 to be reflected in (...). If someone selected, 1,2,3, and 4, I would like 4 to be reflected in (...).

 

Is there a way to do this in Qualtrics? Is there a way to do this using the ‘If’ logic?

Thank you for your help 🙂.

You need to put the Q2 in the separate block after Q1 block. Now in survey flow using branch logic set an embedded data ‘strongestOption’ to strongest option selected using below logic:

if option 1 is selected

     strongestOption = Do not do anything

if option 2 is selected

     strongestOption = Tell them to stop nicely
if option 1 is selected

     strongestOption = Tell them to stop firmy
if option 1 is selected

     strongestOption = Tell the teacher
if option 1 is selected

     strongestOption = Call the police

The above flow will also keep the strongest option selected text in embedded data - strongestOption. Pipe this embedded data in Q2.


Hi @SIATS 
Please follow the below steps
 

Create these 2 questions in 2 separate blocks.
Create such branch logics for all the remaining option choices. See below image for reference.
now pipe text the embedded data in the open end question text. make sure this question is in a separate block.

 


You need to put the Q2 in the separate block after Q1 block. Now in survey flow using branch logic set an embedded data ‘strongestOption’ to strongest option selected using below logic:

if option 1 is selected

     strongestOption = Do not do anything

if option 2 is selected

     strongestOption = Tell them to stop nicely
if option 1 is selected

     strongestOption = Tell them to stop firmy
if option 1 is selected

     strongestOption = Tell the teacher
if option 1 is selected

     strongestOption = Call the police

The above flow will also keep the strongest option selected text in embedded data - strongestOption. Pipe this embedded data in Q2.

I am having trouble understanding this. For example, in the code ‘if option 1 is selected, strongest option = call the police,’ if the person selected ‘tell the teacher’ without selecting ‘call the police,’ the strongest option wouldn’t be ‘call the police,’ would it?

 

Please let me know if I am misunderstanding something. Thank you for your help Shashi.


Hi @SIATS 
Please follow the below steps
 

Create these 2 questions in 2 separate blocks.
Create such branch logics for all the remaining option choices. See below image for reference.
now pipe text the embedded data in the open end question text. make sure this question is in a separate block.

 

Thank you for your help, Omkarkewat. However even if I did select choice description 3, if I selected 1,3,4, then 3 would not be the strongest option. Why does the branch ‘tell them to stop firmly’ say that if choicedescription3 is selected, it is the strongest option?


@SIATS You’ll have to repeat the same branch logic below for choice 4 and choice 5 as well.

I hope this clears your query.


Leave a Reply