Welcome to the LimeSurvey Community Forum

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

Login or expressions in Email Templates

  • michaelji
  • michaelji's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 3 months ago #161609 by michaelji
Login or expressions in Email Templates was created by michaelji
Can I place a expression in the email template?

For Example:

{if(TOKEN:ATTRIBUTE_3=="X", "Survey 1  You will be asked 28 questions about {TOKEN:ATTRIBUTE_1}  This survey should take you 15 minutes to complete ", "")}

{if(TOKEN:ATTRIBUTE_4=="X", "Survey 2   This indicator asks you to describe {TOKEN:ATTRIBUTE_1}.  There are 60 questions related to this survey and you should allow for 30 minutes to complete.  ", "")}

{if(TOKEN:ATTRIBUTE_5=="X", "Survey 3   This survey asks you to describe the leadership of {TOKEN:ATTRIBUTE_1}.  There are 40 statements about your leadership in this survey and you should allow for 20 minutes to complete.  ", "")}


There are three possible surveys the participant can take it could be 1,2,3 or any combination of the three. I don'y want to have to change the email template fro every combination. Attributes 3-5 define what they will take.

Thanks if you have any ideas.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 3 months ago #161621 by Joffm
Replied by Joffm on topic Login or expressions in Email Templates
Hello, michaelji,
I suppose you tried if you can use expressions in email templates.
Otherwise: manual.limesurvey.org/Email_placeholders

Now my question.
Are there three independent surveys or three parts of one survey?

If there are three surveys you cannot use the {SURVEYURL} placeholder but have to insert the url of the survey manually.

On the other side I think that there are only three parts of one survey (because of the ATTRIBUTE_1 which is unique for all parts).
In this case you could expand your expression to all 7 possible combinations

Just some ideas

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
6 years 3 months ago #161630 by jelo
Replied by jelo on topic Login or expressions in Email Templates

Joffm wrote: If there are three surveys you cannot use the {SURVEYURL} placeholder but have to insert the url of the survey manually.

The mailing could be done from a 4th survey, which is rerouting to the three surveys.
Since Limesurvey is not supporting "Skip to"-logic (some call it jump-logic) but only "Display-logic"it could be a daunting task to hide all questions of one or two surveys, when having all surveys in one project.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: michaelji
The topic has been locked.
  • michaelji
  • michaelji's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 3 months ago #161639 by michaelji
Replied by michaelji on topic Login or expressions in Email Templates
Thanks for the replies.
I have a survey with three parts (they are three different surveys imported into one master survey) which are assigned via a token attribute and set conditions . Any combination of the three can be assigned to a participant. I am trying to provide instructions (basic) or information regarding the survey(s) assigned. I would like to give them information about how long they should allow before they begin: if sub-Survey 1,2 then 30 minutes. If sub-Surveys 1,2,3 then 60 minutes.

I am already providing detailed information in the Survey Welcome Message using this logic, but was hoping to provide similar information in the welcome email.

AND yes, I have tried the if statements in the email template, but the if statements are being ignored or do not show up in the email.

Thanks
The topic has been locked.
More
6 years 3 months ago #161646 by jelo
Replied by jelo on topic Login or expressions in Email Templates

michaelji wrote: AND yes, I have tried the if statements in the email template, but the if statements are being ignored or do not show up in the email.

Sounds like a bug in LimeSurvey. Not many users seem to use these things and bugs are reoccurring quite often.
What version/build of LimeSurvey do you use?

LimeSurvey can support Expression Manager in email templates since version 1.92.

You can use Expression Manager to use expressions for tailoring an email

manual.limesurvey.org/Email_templates#Email_placeholders

Example can be seen here:
manual.limesurvey.org/Expression_Manager..._in_invitation_email

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • michaelji
  • michaelji's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 3 months ago #161695 by michaelji
Replied by michaelji on topic Login or expressions in Email Templates
Version 2.72.4+171110
The topic has been locked.
  • michaelji
  • michaelji's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 3 months ago #161696 by michaelji
Replied by michaelji on topic Login or expressions in Email Templates
How can I reference the "Field caption" in a Token Attribute?

I could, maybe, just show {TOKEN:ATTRIBUTE_3.Field caption} if there is a way to reference it. I have entered descriptions under the Field caption column in the Attributes Manager.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 3 months ago #161697 by Joffm
Replied by Joffm on topic Login or expressions in Email Templates
Hi,
I tested and it worked when I only inserted "ATTRIBUTE" instead of "TOKEN:ATTRIBUTE

{if(ATTRIBUTE_3=="X", "Survey 1 You will be asked 28 questions about {TOKEN:ATTRIBUTE_1} This survey should take you 15 minutes to complete ", "")}



Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • michaelji
  • michaelji's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 3 months ago #161779 by michaelji
Replied by michaelji on topic Login or expressions in Email Templates
Thanks, that seems to work. I checked in LS 3.0x and this does not work in it!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose