Multiple OR conditions in Survey Gizmo

Published on the 18 novembre 2009

During the last days, I have been programming an online survey with Survey Gizmo. It was brand new for me, but I found the solution is very practical and quite intuitive. Though, I got myself blocked at one point, which kept me thinking hard for a few hours: how to implement multiple OR conditions for a page or a question?

Survey-Gizmo

Option 1: Show when |condition|

Having a page displayed only when |condition| is quite easy to understand. Same thing for making a question appear only on certain conditions. But I had to make something a little special: have a question displayed when |condition1| OR |condition2| OR |condition3|, etc.

First, I tried to make it simple, as the RegEx logic suggested: /option1|option1|option3/. But I must not have got it well, cause it didn’t work. At all. Maybe someone can explain me what RegEx logic is?

Option 2: Hide when rule

Anyway, I only had one option left: use the advanced Hide when rule. To write a multiple OR condition rule, you just need to follow this model formula:

Hide when : ‘[%%3:NomQuestion %%]’ == ‘réponse1’ OR ‘[%%3:NomQuestion %%]’ == ‘réponse2’ OR ‘[%%3:NomQuestion %%]’ == ‘réponse3’

It’s basically quite simple, but that’s the point I got stuck in. I wrote a similar condition, and it didn’t work. It actually worked as long as I only had my 3 first conditions, but it stopped working as soon as I added my 2 last conditions (I had a total of 5). Any idea of the trick?

No quote sign in reporting values for Hide when rule

(Of course, hum.) Well, after a few hours of tests and researches, I finally found out what was not working. Some of the questions in my survey required a text answer, which were suggested either with checkboxes or radiobuttons. So the possible answers had a text value, and so did their reporting value. I simply hadn’t noticed that the 2 last conditions values included a simple quote sign. As this symbol is used in the formula, it was screwing it all.

Finally, I just modified the reporting value of my 2 last conditions, and it started working all fine. So pay attention when using Survey Gizmo: when an answer to a question includes a quote, don’t copy it in the reporting value field.