Welcome to the LimeSurvey Community Forum

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

[version 4.3.1] different question validation on conditioned subquestions

  • cesoielampo
  • cesoielampo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 8 months ago #202988 by cesoielampo
Hello,
i have a question i am working on which has 3 of the 4 subquestion appearing depending on a previous answer.
It's an array texts question.
I now would like to set a Question validation equation so that SQ01, SQ02 and SQ03 can have a minimum value of 1 and SQ04 can have a minimum value of 0.

If i set the validation equation like
Code:
(Q2_SQ01_SQ01.NAOK > 0) AND (Q2_SQ02_SQ01.NAOK > 0) AND (Q2_SQ03_SQ01.NAOK > 0) AND (Q2_SQ04_SQ01.NAOK > 0)

the relevance won't say the answers are good until all of the "conditioned" Q2 subquestions are filled-in, even if they are not showing.

What am i missing? How can i do this?

Thanks,
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 8 months ago #202991 by Joffm
You have to add the condition of showing to your validation, that it is only validated if shown.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • cesoielampo
  • cesoielampo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 8 months ago #202992 by cesoielampo
Sorry Joffm,
i don't think i got you. Is there a way to specify "run the relevance just on shown subquestions"?

Thanks,
The topic has been locked.
  • cesoielampo
  • cesoielampo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 8 months ago #202994 by cesoielampo
Ok, sorry,
It seems that trying:
Code:
(((Q2_SQ01_SQ01.NAOK > 0) OR is_empty(Q2_SQ01_SQ01.NAOK)) AND ((Q2_SQ02_SQ01.NAOK > 0) OR is_empty(Q2_SQ02_SQ01.NAOK)) AND ((Q2_SQ03_SQ01.NAOK > 0) OR is_empty(Q2_SQ03_SQ01.NAOK)))

and setting the question as "mandatory" works as expected.

Thanks for your time.

Regards,
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose