Welcome to the LimeSurvey Community Forum

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

if-statement in text/email: with explanation and real-life example?

  • mad99
  • mad99's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 4 months ago - 5 years 4 months ago #177408 by mad99
[hr]Hi Forum,
I'm searching for a short explanation about if-statement in text an email-tempaltes.

Does anybody now a good ressource with short theoretical-explanation with real-life examples?

Something like:

NOT EMPTY PLACEHOLDER:
{if(FIRSTNAME != '','FIRSTNAME', 'firstname is empty')}

NOT EMPTY TOKEN:
{if(TOKEN:ATTRIBUTE_1 != '','TOKEN:ATTRIBUTE_1', 'TOKEN:ATTRIBUTE_1 is empty')}

[hr]

EXIST PLACEHOLDER:
{if(LASTNAME != FALSE ,'LASTNAME','lastname does NOT EXIST')}

NOT EMPTY TOKEN:
{if(TOKEN:ATTRIBUTE_2 != FALSE ,'TOKEN:ATTRIBUTE_2', 'TOKEN:ATTRIBUTE_2 does NOT EXIST')}


[hr]


MATCH VALUE PLACEHOLDER:
{if(FIRSTNAME == 'Martin','FIRSTNAME', 'firstname is empty')}

MATCH VALUE TOKEN:
{if(TOKEN:ATTRIBUTE_1 == 'DU', 'TOKEN:ATTRIBUTE_1', 'TOKEN:ATTRIBUTE_1 is not DU')}

[hr]

I found only something like this manual.limesurvey.org/images/1/14/Em-syn...ighlighting-1-v2.jpg
Or documentation about e-mail template but not with {if} statement. ( manual.limesurvey.org/Email_templates#Email_placeholders )
Or some help in forum for particular questions but not any overview about ALL SOLUTIONS/POSSIBILITIES.


Would be great to get help/links.

Cheers
Martin
Last edit: 5 years 4 months ago by mad99.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177456 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.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose