Need help to create a validation rule for Yes/No value type

Hi Community,

I am trying to create a validation rule on yes/no value-type of dataelement which should give an error if user save a ‘no’ .

left side: same element of yes/no type i.e Foetal heart recorded hourly
operator: equal to
right side: have tried with “true”,“‘true’”,“false”,“‘false’”

I have also tried with compulsory operator but it is always giving a error even if I click yes

I want to create a more complex validation with check on 2 type of yes/no elements and it should check both for ‘yes’ i.e if dataelement1 is yes then dataelement2 should also be yes but for now even simple yes/no check is also not working.

Can anyone help me in this regard, may be I am missing something in the expression.

I have created a following rule on the link below, may be it will be reset to default tomorrow morning :frowning:
version: 2.30
instance: https://play.dhis2.org/2.30
validation rule: Foetal heart recorded hourly
dataSet: Facility Assessment

Thanks ,

1 Like

Hello Sourabh,
Please once try, true or false value without a quote. It might work.

Refer to Program rule, assign value by summing boolean data elements