Advanced Display Logic or Skip Logic | XM Community
Skip to main content
Solved

Advanced Display Logic or Skip Logic

  • March 27, 2019
  • 3 replies
  • 148 views

Forum|alt.badge.img+9
  • Level 2 ●●
  • 61 replies
Is it possible to write out far more advanced skip or display logic somehow? I have multiple grouping categories that I want to skip/disply...for example... DISPLAY IF: (Q3=01 OR (Q1=02 OR (Q1=05 AND Q7=18)) OR (Q22=8 AND CONSENT=1)) AND VOX>8 I'm really just trying to group complex statements together logically. So VOX>8 has to apply across all the other conditions. This is just an example of something I'm having to deal with repeatedly. Right now I would have to write out every single combo as separate logical sets because I can't seem to find a way to put logical sets _within existing logical sets_.

Best answer by fleb

Hi @Pete_L, you could do this using JavaScript quite easily. Write your statements using piped text and JavaScript operators. Send result of the statement (i.e.: true/false) to an embedded field and base your skip/display logic on this field. Don't forget to define the embedded field in the survey flow. A very simple example: Qualtrics.SurveyEngine.addOnload(function() { var display = "${q://QID6/SelectedChoicesRecode}" == 3 || "${q://QID6/SelectedChoicesRecode}" == 1; Qualtrics.SurveyEngine.setEmbeddedData( "display1", display) });

3 replies

Forum|alt.badge.img+9
  • Author
  • Level 2 ●●
  • 61 replies
  • March 27, 2019
Here is another, simpler example: DISPLAY IF: [CurrentLoop# <> 32] OR ([CurrentLoop#] = 32 and (SEX=1 OR SEX=2))

fleb
Level 3 ●●●
Forum|alt.badge.img+6
  • Level 3 ●●●
  • 197 replies
  • Answer
  • March 27, 2019
Hi @Pete_L, you could do this using JavaScript quite easily. Write your statements using piped text and JavaScript operators. Send result of the statement (i.e.: true/false) to an embedded field and base your skip/display logic on this field. Don't forget to define the embedded field in the survey flow. A very simple example: Qualtrics.SurveyEngine.addOnload(function() { var display = "${q://QID6/SelectedChoicesRecode}" == 3 || "${q://QID6/SelectedChoicesRecode}" == 1; Qualtrics.SurveyEngine.setEmbeddedData( "display1", display) });

Forum|alt.badge.img+9
  • Author
  • Level 2 ●●
  • 61 replies
  • March 27, 2019
Thank you Fleb! I was hoping for a native solution, but if I have to resort to JavaScript I will!