Welcome to the LimeSurvey Community Forum

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

Équation de validation

  • theomerend
  • theomerend's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #239674 by theomerend
Équation de validation was created by theomerend
Bonjour, 

J'ai créé un questionnaire en ligne ayant pour objectif de valider des recommandations et ai utilisé des questions à choix unique avec commentaire. 
J'aimerais que les participants donnent un score allant de 1 à 9 pour chaque recommandation et qu'ils indiquent un commentaire lorsque le score est inférieur à 7. J'aimerais donc rendre obligatoire le commentaire pour les scores 1 à 6. 
J'ai vu qu'on pouvait indiquer une équation de validation mais je ne m'y connais absolument pas en code... 
Quelqu'un pourrait-il m'aider à trouver la bonne équation ?? 

Je vous remercie d'avance, 
Bonne journée 

 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago #239676 by tpartner
Replied by tpartner on topic Équation de validation
Please use English in this section of the forum.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • theomerend
  • theomerend's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #239680 by theomerend
Replied by theomerend on topic Équation de validation
Hello, 

I have created an online questionnaire with the objective of validating recommendations and have used single choice questions with comments. 
I would like the participants to give a score from 1 to 9 for each recommendation and to indicate a comment when the score is lower than 7. So I would like to make commenting mandatory for scores 1-6. 
I saw that you could indicate a validation equation but I don't know anything about code... 
Could someone help me to find the right equation? 

I thank you in advance, 
Have a nice day 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago #239688 by tpartner
Replied by tpartner on topic Équation de validation
Assuming, for example, you have a question code "Q1" and answer codes 1-9, the validation equattion would look something like this:

Code:
is_empty(Q1)
OR
Q1 > 6
OR
!is_empty(Q1_comment)

Sample survey attached: 

File Attachment:

File Name: limesurvey...3293.lss
File Size:20 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago - 1 year 3 months ago #239689 by Joffm
Replied by Joffm on topic Équation de validation
Tony was faster

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 3 months ago by Joffm.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago #239691 by tpartner
Replied by tpartner on topic Équation de validation

Tony was faster
A race I don't win very often. :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • theomerend
  • theomerend's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #239693 by theomerend
Replied by theomerend on topic Équation de validation
Thanks for your answer.
It doesn't work... when I put the equation Q1 > 6, if I check for example the score 4 and I indicate a comment, the software tells me that I didn't answer correctly to the question... Do you have a solution?

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago #239694 by Joffm
Replied by Joffm on topic Équation de validation
Did you only insert "Q1<6"?
You have to insert the whole logical term.

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • theomerend
  • theomerend's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 3 months ago #239696 by theomerend
Replied by theomerend on topic Équation de validation
Ha indeed, it works very well! Thank you very much !! :)

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 3 months ago #239697 by tpartner
Replied by tpartner on topic Équation de validation
Why do I bother with sample surveys???

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose