Loop & Merge with empty custom fields | XM Community
Skip to main content

I have created a block with loop & merge that will go through only asking based on a previous questions selected answers. I edited the fields for the loop and merge to have them answer based on what they previously selected. However, not all questions in the loop have the same number of selections so how do I not show the empty fields.

 

For example, my Loop & Merge fields look like:

FIELD1, FIELD2, FIELD3, FIELD4

TitleA, opt1, opt2, opt3

TitleB, optA, optB

TitleC, optionA, optionB, optionC

TitleD, only

Add a display logic to the choice to display only if the field is not empty.


Add a display logic to the choice to display only if the field is not empty.

Everything I try this, I can’t find the option for the field being empty. Where is that option?


share a screenshot of the options you are seeing and what you are doing.


Here is what the fields in the Loop & Merge look like:

Then when going through the loop, the first three are fine, but the fourth one looks like:

 


 


Unfortunately, Qualtrics doesn’t let you add display logic based on loop & merge fields. 

I would hide the choices with JavaScript:

Qualtrics.SurveyEngine.addOnload(function() {
var fields = "${lm://Field/2}","${lm://Field/3}","${lm://Field/4}","${lm://Field/5}"];
jQuery("#"+this.questionId+" .Selection").each(function(i) {
if(fieldsli].length==0) jQuery(this).hide();
});
});

 


Leave a Reply