Excel to Qualtrics | XM Community
Skip to main content

Hey!

I have an excel file with 700 rows and 5 columns. 

in each row there is an animal name (in Hebrew), and in the following columns there are categories names. For example, in A1 “cat” and in B1 “pet” and in C1 “furry” and so on.

I would like to create a survey with 700 questions, where in each question the participant can see the animal name and the categories belong to it, and to press “V” or “X” for each category in order to confirm or decline it. 

How can I do it computerized? 

Thank you!!

You can use a Loop & Merge block. Copy and paste your Excel into the loop & merge field setup. There would be one multiple choice question in the block with your confirm/decline question.  Pipe the loop and merge fields, which are the animal and categories, into the question text (e.g., ${lm://Field/1}, etc.).

You’ll need to use JavaScript to do the press “V” or “X” to answer.


Great thank you! It works. 

My problem now is that some animals have 3 categories and some have only 2.

When I do the table of the Loop & Merge, there are some empty slots, which I want to conceal. for example:

I want to have here only 2 options and not 3 (delete the third option only in this question)

I tried to have a logic condition, but I didn’t see a condition based on the whether the question it is not empty.

How can I do it?


You can use JavaScript to hide the blank categories:

Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" .Selection .LabelWrapper span").each(function() {
var category = jQuery(this);
if(category.text().length == 0) category.closest("li").hide();
});
});

 


Leave a Reply