Populate Text/Graphic from external source (csv) | XM Community
Solved

Populate Text/Graphic from external source (csv)

  • 8 April 2024
  • 2 replies
  • 20 views

Userlevel 1
Badge +8

The scenario is that there are 50 text examples that survey participants would be evaluating through a Matrix question (rubric).

Instead of cutting and pasting the content of each of those text example into 50 different Text/Graphic questions, is it possible to have the content of an external source, like a csv file, populate into the Text/Graphic option?

If this is possible, what would the process look like/involve? Randomization would be nice but not necessary.

I can mess around with code, but am not facile at writing it from scratch.

Any guidance would be greatly appreciated.

icon

Best answer by lizb311 8 April 2024, 19:36

View original

2 replies

Userlevel 4
Badge +19

Would something like this work?

  • Put all 50 items as individual response options in a multiple choice question.
    • Use the “edit multiple” feature to copy / paste all of the items into the question in bulk.
    •  Put the question on its own page.
    • Hide the question from respondents using Javascript, so that the question not display. Make sure you DO NOT make the question required, or it’ll get glitch-y. Javascript to hide the question would be something like this (from this support post):

Qualtrics.SurveyEngine.addOnload(function() {
    jQuery(
"#"+this.questionId).hide();
   
this.clickNextButton();
});

  • Add another block. Click on the block so the “Edit block” pane appears on the left hand side of your screen. Make the block a “Loop & merge.” 
    • Click the button to turn on the loop and merge. Check the box to loop based off a question. Select the hidden question you just made, and make the logic show the loop if the item was *displayed.*. Unless you add randomization or display logic to your hidden question, all of the items should count as “displayed” (even though you had that Javascript to hide the question)
    • Loop & Merge Settings

       

    • You can randomize the loop order from here, too. You can also display a random subset of the loops if you don’t want respondents answering for all 50 items (which sounds like it could take a long time)
    • Put your matrix question into this loop & merge block. Add piped text for the Loop & Merge field so the matrix question is referencing the correct field each time. Most likely, you’ll use something like ${lm://Field/1} but you might also want to add other fields to your loop & merge settings and use one of those. It just depends on your specific data/use case.
    • Path to get piped text from Loop & Merge fields

       

Userlevel 1
Badge +8

Thank you for your response @lizb311. I’m just getting back to this project now. I’ll try your suggestion and see if I can make it work. I may check back in if I have any questions.

Leave a Reply