Welcome to the LimeSurvey Community Forum

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

Nested IF flagged as 'too many commas'

  • outofgamut
  • outofgamut's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 7 months ago - 8 years 7 months ago #123463 by outofgamut
Nested IF flagged as 'too many commas' was created by outofgamut
I'm banging my head against the wall trying to understand why Limesurvey is not having my nested IF-statement. It was originally much longer, I've now cut it down for testing.
Code:
{if (Shaded >= 5 && Oneortwopositive, 'Consider a major depressive syndrome in this patient.', if (Shaded >=2 && Oneortwopositive, if (Totalscore >=20, 'Consider other depressive disorder (SEVERE)')))}

This is what happens:


I'm pretty sure I've got the syntax right...

EDIT:
I think I worked it out. It seems you can't omit empty arguments B)
Code:
{if (Shaded >= 5 && Oneortwopositive, 'Consider a major depressive syndrome in this patient.', if (Shaded >=2 && Oneortwopositive, if (Totalscore >=20, 'Consider other depressive disorder (SEVERE)', ''),''))}
Last edit: 8 years 7 months ago by outofgamut. Reason: Found a solution
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose