Customizing the way embedded data pipes into survey | XM Community
Skip to main content
Question

Customizing the way embedded data pipes into survey


I'm creating a project where users that log in based on email id (pulling from Contact List) need to see a list of emails that checked into an organization. The number of people/emails checking into an organization can be in the 100s and the total number of organizations can be between 600-700. I've gotten the instrument to work technically but because of the way the emails are delimited in the uploaded contact list, all the emails appear in a horizontal line that is pretty unsightly. Please see below. Is there any way to customize the piped embedded data ${e://Field/Email%20List} to make this appear as an actual list with emails one below the other instead of the long string? Thanks for your help !

2 replies

Subu
Level 2 ●●
Forum|alt.badge.img+5
  • Level 2 ●●
  • 53 replies
  • August 8, 2019
Hi @Suja, Considering you have comma(,) between each email id. You can can go with below solution. 1. Go to the place you have added ${e://Field/Email%20List} in the question, switch to HTML view. Add the piping text inside a span tag and give an id like below - <span id="ABC">${e://Field/Email%20List}</span> 2. Add JS in that question and add below script inside Qualtrics.SurveyEngine.addOnload(function() Like below - Qualtrics.SurveyEngine.addOnload(function() { /*Place your JavaScript here to run when the page loads*/ var X =document.getElementById("ABC").innerText; var str=X.split(","); var strX=""; for(var i=0;i<str.length;i++) { strX=strX+str[i]+"\\n"; } document.getElementById("ABC").innerText = strX; });

  • Author
  • 1 reply
  • August 8, 2019
Qualtrics Support found a simpler solution to my problem. I just needed to replace commas with line breaks "<br>" in my contact list and that fixed the problem. Thanks, @Subu for your help!

Leave a Reply