Welcome to the LimeSurvey Community Forum

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

Can I validate based on the previous answer?

  • luayessa
  • luayessa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 2 weeks ago #93589 by luayessa
I want to be validate the answer based on the answer of previous question.
For example:
Q1: How old are you?
Q2: How old are your son?

Now, the answer of Q2 should be lower than the answer of Q1.
How can I do this validation?
The topic has been locked.
  • luayessa
  • luayessa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 2 weeks ago #93601 by luayessa
Replied by luayessa on topic Can I validate based on the previous answer?
I got it.
You can check this tutorial page: docs.limesurvey.org/Expression+Manager+Sample+Surveys
If you are not patient, check this survey: docs.limesurvey.org/tiki-download_wiki_a...attId=115&download=y
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 2 weeks ago #93603 by DenisChenu
Replied by DenisChenu on topic Can I validate based on the previous answer?
Q2 < Q1 in relevance equation.

docs.limesurvey.org/Expression+Manager

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • luayessa
  • luayessa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 2 weeks ago #93611 by luayessa
Replied by luayessa on topic Can I validate based on the previous answer?
Thank you for your answer, but as I know, the relevance equation helps to show or hide the question but not to validate the answer.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 2 weeks ago #93614 by DenisChenu
Replied by DenisChenu on topic Can I validate based on the previous answer?
OUps .... :blush: sorry.

Question validation equation .... in advanced settings of the 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 , plugin development .
I don't answer to private message.
The following user(s) said Thank You: luayessa
The topic has been locked.
  • luayessa
  • luayessa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 2 weeks ago #93618 by luayessa
Replied by luayessa on topic Can I validate based on the previous answer?
Sorry, but the validation equation is a regular expression. Can we use a SGQA identifier in the regular expression?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 2 weeks ago #93619 by DenisChenu
Replied by DenisChenu on topic Can I validate based on the previous answer?

luayessa wrote: Sorry, but the validation equation is a regular expression. Can we use a SGQA identifier in the regular expression?

To test, in a numeric question type, if Q1 < Q2, use it directly in advanced setting/Question validation equation

You can use regular expression to with EM in "Question validation equation" : RegExp(blabla)

Not validation equation but "Question validation equation"
See docs.limesurvey.org/Expression+Manager#Validation and docs.limesurvey.org/Advanced+question+settings#em_validation_q

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: luayessa
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose