Welcome to the LimeSurvey Community Forum

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

condition

  • survey2020
  • survey2020's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 5 months ago #207463 by survey2020
condition was created by survey2020
Hi. I have a question.
An access code must be entered for the survey that I am doing. That is the first question is: "ID number on the questionnaire". With the fourth question the question comes up again: "" ID number on the questionnaire ".
This repetition serves to prevent incorrect entry of the ID number.
How do I ensure that the ID number for the fourth question is always correct if it matches the first? Is there a condition for that?

Thank you
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 5 months ago #207465 by Joffm
Replied by Joffm on topic condition
Validation: ID1==ID2

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • survey2020
  • survey2020's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 5 months ago #207565 by survey2020
Replied by survey2020 on topic condition
Hi. I put " ID1==ID2" in the validation field, but if I try to do this in the preview, it shows me an error. No matter if I enter the code correctly or incorrectly, it will be displayed as incorrect.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 5 months ago #207568 by Joffm
Replied by Joffm on topic condition
Show, what exactly you did.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • survey2020
  • survey2020's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 5 months ago #207570 by survey2020
Replied by survey2020 on topic condition
Hi Joffm, it just worked! It wasn't clear to me that I need to change the code for the questions for it to work. Now I've given the questions the right codes(ID1,ID2) and it works!
Thank you for your quick response!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 5 months ago #207602 by holch
Replied by holch on topic condition
You do not need to change the code of the questions, you rather adapt the expression so that it matches the question ids in your survey. Of course it works the other way round too, but if you use the question ids somewhere else in an equation it makes more sense to adapt Joffm's example equation to your questionnaire, rather than your questionnaire to joffm's example equation.

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

The following user(s) said Thank You: DenisChenu
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose