One to many embedded data challenge | XM Community
Skip to main content

@TomG , @Rajesh123  and @chackbusch - the all times leaders… I’m sure you are going to love the following challenge :)

So. Here’s the issue.

I want to upload to the directory a list of customers I need to send out an email to and a survey. 

When they go into the survey, I want to present to them a list of devices they have with us. Each device has 3 columns I need to present about: address, name and status. One customer can have 50+ devices, so embedded data is actually not a solution here, correct? Also, I will not create a long long table with more than 50 one by one parameters….

What is the best way to do so where there’s a search of data in a one to many option?

Does suplamentry data can be used for this?

Thanks!

 

**to make it easy to imagine… the customer will see in the survey: “here is the list of your active devices we refer to:

# device name device address device status
1      
2      
3      
….      
n      

 

@deveer2024,

Two questions:

  1. What is the source of the device data? 
  2. Does the device data need to be saved in the response data or is for display purposes only?

The cleanest solution would be to use JS to do an ajax call to retrieve the data from its source and populate an html table on the fly.


Hi @TomG 

I have the data in excel and cannot call for the source platform for this data, unfortunatly. 

This data is only displayed as a text question (meaning as display a table and not as part of the questions). It should be available at the end, when the customer can download the survey response in PDF (because the table was displayed to him, I guess they would see it in the downloaded PDF). 

Another option I thought about was creating a file for each customer and save it in Qualtrics library, then put in the embedded data for each customer the relevant link. It is not ideal, but will do the work (so the customer can use the link all the time). 

 

What do you think?


If it were me, I would upload the data to a database table and use a web service to populate the data into embedded data fields, then pipe the fields into the html table. Use JS to hide the rows with blank data, but those will still show up in the pdf.


Thanks @TomG ! As always you are a life saver. 

Can I ask which JS is the one to use to hide the empty rows of with the blank data?

 

I think I will combine 2 ways of working. 

For 1-5 devices I will use the embedded data option with hiding rows that are empty, and with the 5+ devices (which is only 20 customers) I will provide a link to a file they can download… 

 

So, let me see if I got it correct. In the embedded data it should be: 

Machine_Name_1 Device_Number_1 Machine_ID_1 Current_Modem_1 Machine_Name_2 Device_Number_2 Machine_ID_2 Current_Modem_2 Machine_Name_3 Device_Number_3 Machine_ID_3 Current_Modem_3
XXXXX XXXXX21533584 XXXX2970 Unknown XXXXXX XXXXXX053 4XXXX682 Unknown        

@deveer2024,

The JS depends on your html. It would be something along the lines of:

Qualtrics.SurveyEngine.addOnload(function() {
jQuery(this.getQuestionContainer()).find("tr").each(function(i) {
if(i>0) {
var td = jQuery(this).find("td").eq(1);
if(td.text().length==0) td.closest("tr").hide();
}
});
});

 


Thank you so much!! @TomG . Have a great day!


Leave a Reply