Inserting an Q.Value into confirm email conditionally

More
1 month 3 days ago #202522 by marcgold
Hi

Wondering if this is even possible, we have a conditional if statement within the confirmation email, but want to add in some data from the survey is this even possible and if so, how.

The following doesn't work. I have tried wrapping the variables in @@****@@ but that doesnt work either.

This is what we have - which doesn't work.
{if (Q15 == "A6","We will process your gratuity of £50 within the next few days to the account details you have provided","Thank you for thinking of the {Q15.Value} we will make the donation of {Q32.Value} on your behalf.  Any balance remaining will be paid to you via BACS within the next 7 days")}


Any help appreciated

Please Log in to join the conversation.

LimeSurvey Partners
More
1 month 3 days ago - 1 month 3 days ago #202537 by tpartner
You cannot put curly braces inside an Expression Manager statement that is already wrapped in curly braces.

You insert a variable into a text string as you would in JavaScript.

Try this:

{if (Q15 == "A6","We will process your gratuity of £50 within the next few days to the account details you have provided","Thank you for thinking of the "+Q15.value+" we will make the donation of "+Q32.value+" on your behalf.  Any balance remaining will be paid to you via BACS within the next 7 days")}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Last edit: 1 month 3 days ago by tpartner.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
1 month 3 days ago #202549 by marcgold
Your a star! As always.
That worked perfectly.

Thanks

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now