Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: about nested if syntax

about nested if syntax 8 Monate 1 Woche her #104840

  • dolly_wen
  • dolly_wens Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 1
  • Karma: 0
Hi, I was trying to use nested if statement, something like (these lines work):

{if(Calculation > 32, 'Right Handed',if(Calculation <= 32 && Calculation >=29,'Moderately Right Handed', if(Calculation <= 28 && Calculation >= 25, 'Weakly Right Handed',if(Calculation == 24, 'Ambidextrous', if(Calculation <= 23 && Calculation >=20, 'Weakly Left Handed', if(Calculation <=19 && Calculation >= 16, 'Moderately Left Handed', 'Strongly Left Handed' ) ) ) ) ) )}

I want my expression to span multiple lines (see the following), which is easier to read. I follow the example (manual.limesurvey.org/Expression_Manager#Conditional_Equations). I began a new line by pressing "Enter" and "Shift", but it does not work. Can anybody kindly help out?

{if(Calculation > 32,
'Right Handed',
if(Calculation <= 32 && Calculation >=29,
'Moderately Right Handed',
if(Calculation <= 28 && Calculation >= 25,
'Weakly Right Handed',
if(Calculation == 24,
'Ambidextrous',
if(Calculation <= 23 && Calculation >=20,
'Weakly Left Handed',
if(Calculation <=19 && Calculation >= 16, 'Moderately Left Handed',
'Strongly Left Handed'
)
)
)
)
)
)}
Letzte Änderung: 8 Monate 1 Woche her von dolly_wen.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.119 Sekunden
Donation Image