- Posts: 169
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
how to write 2 if in one em?
- iscar
- Topic Author
- Offline
- Elite Member
Less
More
8 years 11 months ago #119415
by iscar
how to write 2 if in one em? was created by iscar
{if(a>1,'big','small') if(b>1,'cat','rat')}
i hope this can display "big cat", but it has error in logic file.
what's the problem?
i hope this can display "big cat", but it has error in logic file.
what's the problem?
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1128
- Thank you received: 329
8 years 11 months ago #119419
by Ben_V
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic how to write 2 if in one em?
Code:
{if(a>1,'big','small')} {if(b>1,'cat','rat')}
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
- iscar
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 169
- Thank you received: 0
8 years 11 months ago #119420
by iscar
Replied by iscar on topic how to write 2 if in one em?
i just don't understand why to use 2 {}?
it's not benefit to write complex EM
it's not benefit to write complex EM
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
8 years 11 months ago - 8 years 11 months ago #119423
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic how to write 2 if in one em?
Alternatve:
Or
But i don't like this way.
If in you spreadsheet system you write :
=if(1,"A","B")if(0,"A","B")
It broke too....
Code:
{join(if(a>1,'big','small')," ",if(b>1,'cat','rat'))}
Or
Code:
{if(a>1,'big','small')+" "+if(b>1,'cat','rat')}
But i don't like this way.
If in you spreadsheet system you write :
=if(1,"A","B")if(0,"A","B")
It broke too....
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 8 years 11 months ago by DenisChenu.
The topic has been locked.
- iscar
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 169
- Thank you received: 0
8 years 11 months ago #119432
by iscar
Replied by iscar on topic how to write 2 if in one em?
{join(if(a>1,'big','small')," ",if(b>1,'cat','rat'))}
why not use ''?
why not use ''?
The topic has been locked.