Welcome to the LimeSurvey Community Forum

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

Nested IF flagged as 'too many commas'

More
10 years 3 weeks ago - 10 years 3 weeks ago #123463 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: 10 years 3 weeks ago by outofgamut. Reason: Found a solution
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose