Welcome to the LimeSurvey Community Forum

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

Is there a code for “if any answer equals X, then…”

  • hvitor
  • hvitor's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 8 months ago #241075 by hvitor
Please help us help you and fill where relevant:
Your LimeSurvey version: last. 
Own server or LimeSurvey hosting: own server. 
Survey theme/template: default. 
==================
My objective is to send an email to the administrator only if the answer to any radio question was 3 or 4. My questionnaire has lots of these questions… I wanted to be notified by email only if the user answer 3 or 4

I have already seen that it’s possible to use the IF conditional on the email notification field.

I have been trying, but have not been able to come up with a code that makes this idea work.

Any help is appreciated. Thanks in advance!

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 8 months ago #241076 by holch
If you have a lot of different radio questions, just create a equation type question and check via formula if any of the questions are greater than 3.

Or you could use assessment values and give the answers 3 and 4 one point each. Then sum all the assessments values of the questions and if the sum is greater than one, than the person has responded at least 3 or 4 once.

Write this into the equation question and then create the condition for sending the email based on this one equation question.

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

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 8 months ago - 1 year 8 months ago #241078 by Joffm
Other useful functions are If 3 and 4 are the highest codes 
countifop(">","2",Q1,Q2,Q3,...)

else
sum(countif("3",Q1,Q2,Q3,...), countif("4",Q1,Q2,Q3,...))

Have a look at the manual "implemented functions".

Joffm 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 8 months ago by Joffm.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose