Javascript for Retrieving Exact Image from Embedded Data | XM Community
Skip to main content
Solved

Javascript for Retrieving Exact Image from Embedded Data

  • January 22, 2025
  • 2 replies
  • 42 views

Forum|alt.badge.img+1

Hello, I have a survey in Qualtrics where I have set a header javascript and am pulling from information set in that header for a series of questions.

For one particular question, I am pulling from a series of URLs that are in the header javascript and the question flashes a randomly selected image from one of those URLs (these URLs are from the Qualtrics library where I have uploaded a series of images).

The URL is then saved in embedded data called pra_alien1_url (this exact image/url will change depending on the respondent because it is randomized each time). Is it possible for me to reference this exact image again in a later question from the embedded data? Essentially I want the exact image that is selected from the earlier question, the URL of which is then stored in pra_alien1_url, to appear in another question. 

How would I go about doing this in the javascript of that specific later question and how would I have it appear in the question itself? 

Any help would be appreciated!

Best answer by xpoulin

In the rich content editor of the second question, go to the source view and pipe in the ED as the source of the image (pra_alien1_url):

“QuestionText... :<img src="{e://Field/pra_alien1_url}">” … QuestionText”

View original

2 replies

Forum|alt.badge.img+6
  • QPN Level 2 ●●
  • 40 replies
  • January 22, 2025

Why not embed one variable with different image tags inside a Randomizer in survey flow?
Pipe this 1 embedded for all ques such that 1 respondent will have 1 image throughout survey. 
 


Forum|alt.badge.img+1
  • Level 1 ●
  • 7 replies
  • Answer
  • January 23, 2025

In the rich content editor of the second question, go to the source view and pipe in the ED as the source of the image (pra_alien1_url):

“QuestionText... :<img src="{e://Field/pra_alien1_url}">” … QuestionText”


Leave a Reply