Welcome, Guest
Username: Password: Remember me

TOPIC: Can I validate based on the previous answer?

Can I validate based on the previous answer? 1 year 4 months ago #93589

  • luayessa
  • luayessa's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 22
  • Thank you received: 1
  • Karma: 0
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 administrator has disabled public write access.

Can I validate based on the previous answer? 1 year 4 months ago #93601

  • luayessa
  • luayessa's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 22
  • Thank you received: 1
  • Karma: 0
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 administrator has disabled public write access.

Can I validate based on the previous answer? 1 year 4 months ago #93603

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6205
  • Thank you received: 787
  • Karma: 238
Q2 < Q1 in relevance equation.

docs.limesurvey.org/Expression+Manager
The administrator has disabled public write access.

Can I validate based on the previous answer? 1 year 4 months ago #93611

  • luayessa
  • luayessa's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 22
  • Thank you received: 1
  • Karma: 0
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 administrator has disabled public write access.

Can I validate based on the previous answer? 1 year 4 months ago #93614

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6205
  • Thank you received: 787
  • Karma: 238
OUps .... :blush: sorry.

Question validation equation .... in advanced settings of the question
The administrator has disabled public write access.
The following user(s) said Thank You: luayessa

Can I validate based on the previous answer? 1 year 4 months ago #93618

  • luayessa
  • luayessa's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 22
  • Thank you received: 1
  • Karma: 0
Sorry, but the validation equation is a regular expression. Can we use a SGQA identifier in the regular expression?
The administrator has disabled public write access.

Can I validate based on the previous answer? 1 year 4 months ago #93619

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6205
  • Thank you received: 787
  • Karma: 238
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
The administrator has disabled public write access.
The following user(s) said Thank You: luayessa
Moderators: ITEd
Time to create page: 0.142 seconds
Donation Image