Data Validation Rule for Yes/No value types on a Dataset

Hi,

In an aggregate dataset, how does data validation rules work for Yes/No data elements?
I have 2 Yes/No data elements on the dataset. How can I put a rule such that if data element 1 is ‘No’, user cannot select ‘Yes’ for data element 2?

Thanks for your help!

1 Like

Hi @Quoda

You might want to check the Exclusive Pair option. It says in the docs:

The Exclusive pair allows to assert that if any value exist on the left side then there should be no values on the right side (or vice versa). This means that data elements which compose the rule on either side should be mutually exclusive from each other, for a given time period / organisation unit /attribute option combo.

I think we can interpret this to say “This means that data element 1 which compose the rule on left side should be mutually exclusive from data element 2”

I hope this works well, please update! :+1::+1:

Thanks!

@Gassim
Thanks for your response.
From notes on the Exclusive pair, it appears it would be useful if I want to prevent what has been selected in data element 1 from being selected in data element 2, so that either side should be mutually exclusive from each other.

What I want to achieve can allow both data elements to have the same value but only if the first data element has the said value. An example to clarify:

Q1. Have you designed your plan? Yes/No
Response: No

Q2. Have you validated your plan? Yes/No
Response: Yes

In my use case, a plan cannot be validated if not designed. so I want to prevent the user from selecting ‘Yes’ in Q2 when Q1 is ‘No’. So only when Q1 is ‘Yes’, then Q2 can also be ‘Yes’.