Display question in email template

More
4 months 1 week ago #171781 by SarcoidosisUK
SarcoidosisUK created the topic: Display question in email template
Hi.

I want to display the contents of a question in the 'Basic admin notification' email template. The question contains survey results and is currently displayed on the final page of my survey. I want to also automatically send these results to the participant.

What format do I use to enter a survey question into the email template?

Attachment shows question structure.

Thanks,
J
Attachments:

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #171816 by DenisChenu
DenisChenu replied the topic: Display question in email template
You can try with {QCODE.question}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #171825 by SarcoidosisUK
SarcoidosisUK replied the topic: Display question in email template
Thanks for your help. The question ID I want to display is 767447X29X361
The formats below do not work:

{QCODE.question:767447X29X361}

{QCODE.767447X29X361}

What format should I be using?
Cheers

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #171829 by Joffm
Joffm replied the topic: Display question in email template
Hi,

either you use the SGQA syntax (767447X29X361)
767447 = Survey
29 = Group
361= Question
Answer (in array, multiple questions)

OR the Expression Manager syntax (QCode = Questioncode)

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #171830 by DenisChenu
DenisChenu replied the topic: Display question in email template
Thanks Joffm :)
manual.limesurvey.org/Expression_Manager#Access_to_Variables

For SarcoidosisUK : when you ask for some help : please give the most information you can !

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago - 4 months 1 week ago #171851 by SarcoidosisUK
SarcoidosisUK replied the topic: Display question in email template
Sorry for not sufficient information DenisChenu!

I am still unclear.

QCodes: I have never used QCodes before and the table in the manual does not seem useful for a novice. How do I format my question ID (767447X29X361) with QCode so that it can be inserted into an email template as I require?

SGQA: I have tried inserting the question ID in multiple formats (see template in attachment 1) but none succeed in displaying the question (see blue line in attachment 2).

Thanks again for your help guys.
Attachments:
Last Edit: 4 months 1 week ago by SarcoidosisUK.

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #171855 by Joffm
Joffm replied the topic: Display question in email template
QCode means the question code you are asked for when creating a new question.


Then there are all the additional properties

QCode.question means: the text of the question

So if your question Q1 was "How many children live in your household?"
{Q1.question} displays this text.
{Q1.code} - or only {Q1} displays the answer to this question.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: DenisChenu, SarcoidosisUK

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #171859 by LouisGac
LouisGac replied the topic: Display question in email template
jfyi: in ls4, email template angine will use twig too. So it will be possible to render a question inside a mail just like in survey themes.

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago - 4 months 1 week ago #171864 by DenisChenu
DenisChenu replied the topic: Display question in email template

LouisGac wrote: jfyi: in ls4, email template angine will use twig too. So it will be possible to render a question inside a mail just like in survey themes.

This is really not needed,

I already use QuestionCode.question a lot in : email, endpage, pdf report etc …
Work really great :)

@SarcoidosisUK : try with {KSQsummary.question}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 4 months 1 week ago by DenisChenu. Reason: try with {KSQsummary.question}
The following user(s) said Thank You: LouisGac, SarcoidosisUK

Please Log in or Create an account to join the conversation.

More
4 months 1 week ago #171982 by SarcoidosisUK
SarcoidosisUK replied the topic: Display question in email template
Thanks @Joffm and @DenisChenu I am now using the codes successfully. It is easy when you know how, as always!

Appreciative the help and patience there.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!