Display Question (in loop merge qith multiple question) only if Field/3 is NOT empty | XM Community
Skip to main content
Solved

Display Question (in loop merge qith multiple question) only if Field/3 is NOT empty

  • March 23, 2022
  • 2 replies
  • 278 views

Forum|alt.badge.img+1

I have a loop merge with 3 questions inside it.
The first 2 question should always be showed.
The third one should be displayed only if the field/3 is not empty (or I can switch empty to character 0 so the condition became if "field/3 is not euqal to 0).
Now I am trying to create an embedded data qith the field and then trying to use display logic but I am failing .
How I create embedded data: ${lm://Field/3} (after loop merge block in survey flow I add the embedded data).

Best answer by TomG

Unfortunately, Qualtrics doesn't let you use loop fields in display logic.
As long as the first question is on a different page than the third question, you can add some JS to the first question that saves field 3 as an embedded data field. Then use that embedded data field in the display logic for the third question.
Qualtrics.SurveyEngine.addOnload(function() {
Qualtrics.SurveyEngine.setEmbeddedData("field3", "${lm://Field/3}");
});

2 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • March 23, 2022

Unfortunately, Qualtrics doesn't let you use loop fields in display logic.
As long as the first question is on a different page than the third question, you can add some JS to the first question that saves field 3 as an embedded data field. Then use that embedded data field in the display logic for the third question.
Qualtrics.SurveyEngine.addOnload(function() {
Qualtrics.SurveyEngine.setEmbeddedData("field3", "${lm://Field/3}");
});


Forum|alt.badge.img+1
  • Author
  • March 23, 2022