I have create a validation rule but it don’t work

I have another topic, it’s about validation rule.
Could you please check my xlsform. I have create a validation rule but it don’t work. The rule is, we can’t select jointly (A1+ & A1-); (A2+ & A2-); (A3+ & A3-).
Currently, we can’t select jointly A1+ & A1- but if we select another code then the validation don’t work.

Validation.xlsx (9.8 KB)

Thank you in advance.

@arif_1234, I have split this post into a new topic. It’s always good to have a different topic with a new issue. This should help us make the community systematic, and it would also be easy for the community while searching for similar topics.

BTW, could you also explain your issue a bit so that the community should be able to understand and help you solve your problem?

Sure @Kal_Lam .

The issue is, we can’t select jointly A1+ & A1- (pic 1) but if we select another code then the validation don’t work (pic 2).

The rule is, we can’t select jointly (A1+ & A1-); (A2+ & A2-); (A3+ & A3-). So if we select A1+ & A1- & A2+, it’s incorrect.



.

Hello,
seems a problem of your logic structure, not of KoBo. Defining a decision table might help. not(selected …) covers all other choices

Hi Wross,

The logic structure is, if any of (A1+ & A1-) or (A2+ & A2-) or (A3+ & A3-) was selected jointly, respondents can’t continue the survey. It mean the answer is invalid.

Hope answer your questions.
Thank you.

Hello,
You may try: not(selected … first pair) and not(selected … second pair( and not(selected … third pair).
Your logic problem was combination of not and or … In such cases it is often easier to define the valid clause and negate (not …) it as a whole.

Hi @wroos ,

Brilliant, it works.

Thank you.