- Posts: 15
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Adapt Emails Code greater-than sign
- xibit12
- Topic Author
- Offline
- New Member
Less
More
3 years 8 months ago - 3 years 8 months ago #202909
by xibit12
Adapt Emails Code greater-than sign was created by xibit12
I would like to adapt my (confirmation) emails to the answers of the participants in the survey. My code currently shows an error message for the greater-than-or-equal sign (=>). How can I correct my code?
{if(Dank.NAOK == 0, 'gar nicht dankbar', '')}{if(Dank.NAOK=>1 AND Tag.NAOK == 'A1', 'SuperDankbar', '')}
The variable Dank.NAOK is has a Likert scale and the codes of the question vary from 0 to 4.
{if(Dank.NAOK == 0, 'gar nicht dankbar', '')}{if(Dank.NAOK=>1 AND Tag.NAOK == 'A1', 'SuperDankbar', '')}
The variable Dank.NAOK is has a Likert scale and the codes of the question vary from 0 to 4.
Attachments:
Last edit: 3 years 8 months ago by xibit12.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12790
- Thank you received: 3940
3 years 8 months ago #202911
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Adapt Emails Code greater-than sign
Hi,
first solution: use the correct operator
manual.limesurvey.org/ExpressionScript_-_Presentation#Operators
< <= > >= lt le gt ge relative comparisons
Of course you could have tried this:
instead of your "=>1" use ">0"
instead of your "=>1" use "ge 1" or "gt 0"
And without the camel case (heißt auf Deutsch nicht ohne Grund "Kamelschreibweise") we all are "Superdankbar".
Joffm
first solution: use the correct operator
manual.limesurvey.org/ExpressionScript_-_Presentation#Operators
< <= > >= lt le gt ge relative comparisons
Of course you could have tried this:
instead of your "=>1" use ">0"
instead of your "=>1" use "ge 1" or "gt 0"
And without the camel case (heißt auf Deutsch nicht ohne Grund "Kamelschreibweise") we all are "Superdankbar".
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, holch
The topic has been locked.
- xibit12
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
3 years 8 months ago #202960
by xibit12
Replied by xibit12 on topic Adapt Emails Code greater-than sign
Hi, Joffm,
thanks for your quick help!
it worked with gt for me ({if(Dank.NAOK gt 0 AND [...]).
But with {if(Dank.NAOK > 0 AND [...] or {if(Dank.NAOK >= 0 AND [...] I still had error messages. Even if I used single quotes, there were errors. {if(Thanks.NAOK '>= 0' AND [...]
thanks for your quick help!
it worked with gt for me ({if(Dank.NAOK gt 0 AND [...]).
But with {if(Dank.NAOK > 0 AND [...] or {if(Dank.NAOK >= 0 AND [...] I still had error messages. Even if I used single quotes, there were errors. {if(Thanks.NAOK '>= 0' AND [...]
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13935
- Thank you received: 2551
3 years 8 months ago #202966
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 Adapt Emails Code greater-than sign
@Joffm give you the good answer …
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.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12790
- Thank you received: 3940
3 years 8 months ago #202981
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Adapt Emails Code greater-than sign
If it doesn't work you should revise your code.
Have a look at the source code. Are there any tags, spaces, or...
{if(Dank.NAOK >= 1 and Q1_SQ001.NAOK==2, 'Superdankbar', '')}
{if(Dank.NAOK > 0 and Q1_SQ001.NAOK==2, 'Superdankbar', '')}
{if(Dank.NAOK ge 1 and Q1_SQ001.NAOK==2, 'Superdankbar', '')}
{if(Dank.NAOK gt 0 and Q1_SQ001.NAOK==2, 'Superdankbar', '')}
Joffm
Have a look at the source code. Are there any tags, spaces, or...
{if(Dank.NAOK >= 1 and Q1_SQ001.NAOK==2, 'Superdankbar', '')}
{if(Dank.NAOK > 0 and Q1_SQ001.NAOK==2, 'Superdankbar', '')}
{if(Dank.NAOK ge 1 and Q1_SQ001.NAOK==2, 'Superdankbar', '')}
{if(Dank.NAOK gt 0 and Q1_SQ001.NAOK==2, 'Superdankbar', '')}
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.