piping in text from dropdown displayed to respondent when different from saved for analysis | XM Community
Skip to main content

Hello,

I have a text entry question that is using a supplemental data source (imported data project) with approximately 50,000 dropdown choices. In the manage autocomplete pop up, the variable I’m using for displayed to respondent is different from the variable used for saved for analysis. On a subsequent question, I want to pipe in the text of the choice the respondent selected, but when I try to pipe in the answer, the data that shows is from the variable used for saved for analysis. Qualtrics support tells me I can create branch ifs in the survey flow for each choice that can be selected, but that is not feasible because of the large number of choices. So it seems like some Javascript code could be a solution. If anyone can help with the Javascript for this, I would be very appreciative.

Thank you.

@MarkG What’s your variable? Variable or Embedded Data?


@dxconnamnguyen 

Not sure. The entire survey flow is below, including what is needed to bring in the data from the imported data project. 

 

 

 

In the question with the dropdown:

 

In the subsequent question where I want to pipe in the text the respondent selected from the dropdown, the value of ufid is showing. I want the value of name_major to show.

Thank you for your assistance.


@dxconnamnguyen

Not sure. The entire survey flow is below, including what is needed to bring in the data from the imported data project. 

 

 

 

In the question with the dropdown:

 

In the subsequent question where I want to pipe in the text the respondent selected from the dropdown, the value of ufid is showing. I want the value of name_major to show.

Thank you for your assistance.

You pipe it in as Question field, right? That’s what got saved as the question answer. That’s why you got ufid
Just pipe it in straight from the EmbeddedData → Name_Major


Yes, I piped it in as question field. That’s why I got ufid - makes sense. 

I tried piping in name_major from embedded data. name_major wasn’t listed in the dropdown when hovering over “Embedded Data Field” (after clicking on piped text). So I manually typed in name_major in the box. “${e://Field/name_major}” was inserted. Now, instead of the value of ufid, nothing shows.

Does that result indicate name_major needs to be embedded data in the survey flow? If so, is that done in the supplemental data block shown above, or does it need to be done after the question from which the respondent selects from the dropdown?


Yes, I piped it in as question field. That’s why I got ufid - makes sense. 

I tried piping in name_major from embedded data. name_major wasn’t listed in the dropdown when hovering over “Embedded Data Field” (after clicking on piped text). So I manually typed in name_major in the box. “${e://Field/name_major}” was inserted. Now, instead of the value of ufid, nothing shows.

Does that result indicate name_major needs to be embedded data in the survey flow? If so, is that done in the supplemental data block shown above, or does it need to be done after the question from which the respondent selects from the dropdown?

@MarkG Use the Add Embedded Data at the bottom of the block

 


Thanks. I changed the survey flow as shown below. The text still is not piped in on the subsequent question - nothing is shown. 

 

 


Thanks. I changed the survey flow as shown below. The text still is not piped in on the subsequent question - nothing is shown. 

 

 

It should look exactly like above, left side is Name_Major and right side is the field ${q://……..

By the way, what’s different between ufid and Name_Major?


Are you saying “Set a value now” should be replaced with Name_Major and then on the right side of the equal sign, we need: ${q://QID46/QuestionText}? I can change the left side to Name_Major, but the right side is a dropdown from which I can only select from id, Name_Major, ufid, Response ID, and User Language. I can’t type or paste anything into the right side.

 

ufid is a unique identifier for a person. Name_Major is the person’s name and college major all in one field.


Are you saying “Set a value now” should be replaced with Name_Major and then on the right side of the equal sign, we need: ${q://QID46/QuestionText}? I can change the left side to Name_Major, but the right side is a dropdown from which I can only select from id, Name_Major, ufid, Response ID, and User Language. I can’t type or paste anything into the right side.

Then it’s Name_Major = Name_Major. The rightside is value & leftside is the embedded data name, so leaving that empty mean saving the value to nothing. 


Changed the survey flow to Name_Major = Name_Major. Piping in Name_Major. Still nothing showing.


Changed the survey flow to Name_Major = Name_Major. Piping in Name_Major. Still nothing showing.

Strange. I’m not being able to see what’s going on with you survey set-up. But the flow should work. Kindly refer to this supportpage: https://www.qualtrics.com/support/survey-platform/common-use-cases-rc/customizing-survey-content-based-on-historical-response-data/ to see if you can find out what is wrong. Is Name_Major now appear on the embedded data dropdown list?


The support page you listed is for a different situation although using many of the same tools.

Everything appears to be set up properly to move the data in from the imported data project. On the question with the long dropdown list (QID64), if I change the saved for analysis variable to Name_Major and on the subsequent question, change the piped in variable to ${q://QID64/ChoiceTextEntryValue/1}, the correct text is piped in. So the data from smh2 (the imported data project) seems to be coming into the survey ok. The problem seems to be that the correct value for Name_Major needs to be embedded after the respondent answers the question with long dropdown. That would involve about 50,000 branch ifs to manually set the value of Name_Major for each possible value of ufid. 

To answer your question: If you are referring to the embedded data drop down list I see when I hover over embedded data field after clicking on piped text, → yes, Name_Major appears on the list.

 

 


Thank you for your suggestions, We have decided to return to using Name_Major for the save for analysis variable.


Leave a Reply