Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

If-case with several conditions

More
7 years 9 months ago #161307 by DarioSto
Hi There,

Is it possible to put more than one condition into an if-case?
E.g., is it possible to code something like this within EM(?):

{if (Code == 'a' or 'b' or 'c' or 'd', 'example sentence', '')}

This means that "if Code typed in by participants equals a,b,c or d, Limesurvey should print out an example sentence". If it's not, nothing should happen (' ').

The problem is LS does not compile with this Expression.

Help appreciated! :)
The topic has been locked.
More
7 years 9 months ago #161309 by tpartner
Code:
{if (Code == 'a' OR Code == 'b' OR Code == 'c' OR Code == 'd', 'example sentence', '')}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose