Welcome to the LimeSurvey Community Forum

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

If-case with several conditions

  • DarioSto
  • DarioSto's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago #161307 by DarioSto
If-case with several conditions was created 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.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 months ago #161309 by tpartner
Replied by tpartner on topic If-case with several conditions
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.

Lime-years ahead

Online-surveys for every purse and purpose