Welcome to the LimeSurvey Community Forum

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

Email Results

  • salter
  • salter's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 6 months ago #167971 by salter
Email Results was created by salter
Can I email results to certain users based on result of a question?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #167972 by holch
Replied by holch on topic Email Results
It depends on what you define as "certain users".

You can use the two different admin notification emails to send emails to certain addresses. In the field you can use expression manager to determine whether the result should be sent and to whom it should be sent.

In the email template for those two different types of admin notifications you can insert the results via expression manager as well.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • salter
  • salter's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 6 months ago #167974 by salter
Replied by salter on topic Email Results
I think that's what I'm looking to do. I have a survey used by three locations. one of the questions is "Location"
So, if location A is selected, send results to UserA.

Is this what you are saying I can do?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #167975 by holch
Replied by holch on topic Email Results
yes, this is doable. So you know the 3 different emails before, then you have a question with the 3 different locations.

Now you need to write an expression into the email field of the admin notification that gives you the correct email it should be sent to, depending on the location question.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #167976 by holch
Replied by holch on topic Email Results
Something like (not tested):
Code:
{if(location==A; "userA@email.tld"; if(location==B; "userB@email.tld"; if(location==C; "userC@email.tld"; "")}

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • salter
  • salter's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 6 months ago #167977 by salter
Replied by salter on topic Email Results
Thank you so much, I will give it a try. I would enter this in the "Send detailed admin notification email to:" field of the Survey Notification and Data Section?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #167978 by holch
Replied by holch on topic Email Results
Exactly. But you will of course have to adapt this to your survey. The overall logic should be correct, but I am not sure if I did some mistake somewhere with ";" vs ",", the () etc. You will have to have a look at the right syntax in the manual for the expression manager.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • salter
  • salter's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 6 months ago #167979 by salter
Replied by salter on topic Email Results
Understood, thanks for pointing me in the right direction. I will post my results.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago - 6 years 6 months ago #167980 by holch
Replied by holch on topic Email Results
You might or might not need the {}, I am never sure where you need them and where you don't.

But I already found some errors in my code. There are definitely missing some closing ")" and I think the semi colon needs to be actually a comma ( www.limesurvey.org/manual/Expression_Man...mplemented_Functions ).
This should be better:
Code:
{if(location==A, "userA@email.tld", if(location==B, "userB@email.tld", if(location==C, "userC@email.tld", "")))}

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 6 years 6 months ago by holch.
The topic has been locked.
  • salter
  • salter's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 6 months ago #167981 by salter
Replied by salter on topic Email Results
Tried every variation doesn't seem to work.
So I tried a simple one
{if(Facility==A, "my address","my address")} hoping that right or wrong I should have received an email, but I didn't.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #167982 by holch
Replied by holch on topic Email Results
So "Facility" is the question code for the questions with the facility location? And "A" is the answer code for some of the answers?

Can you upload an .LSS file with just the relevant parts of the survey?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #167983 by holch
Replied by holch on topic Email Results
By the way: Which version of LS are you using and does sending emails work with your installation in general?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose