- Posts: 72
- Thank you received: 10
Ask the community, share ideas, and connect with other LimeSurvey users!
{DummyAge=if(Demographie2.NAOK < 16, DummyAge="A", if(Demographie2.NAOK > 15 && Demographie2.NAOK < 30, DummyAge="B", if(Demographie2.NAOK > 29 && Demographie2.NAOK < 45, DummyAge="C", if(Demographie2.NAOK > 44, DummyAge="D" ))))}
{if(1,QCODE="A",QCOE="B")}
{QCODE=if(1,"A","B")}
{DummyAge=if(Demographie2.NAOK < 16, "A", if(Demographie2.NAOK > 15 && Demographie2.NAOK < 30, "B", if(Demographie2.NAOK > 29 && Demographie2.NAOK < 45, "C", if(Demographie2.NAOK > 44, "D" ))))}
elissa wrote: At first glance there are commas (,) missing before successive "if" commands.
{ QF2 = if (QF1.NAOK < 18, "1", if (QF1.NAOK > 17 && QF1.NAOK < 24, "2", if (QF1.NAOK > 23 && QF1.NAOK < 30, "3", if (QF1.NAOK > 29 && QF1.NAOK < 36, "4", if (QF1.NAOK > 35 && QF1.NAOK < 43, "5", if (QF1.NAOK > 42 && QF1.NAOK < 50, "6", if (QF1.NAOK > 49 && QF1.NAOK < 58, "7", if (QF1.NAOK > 57 && QF1.NAOK < 65, "8", "9")))))))) }