Urgent; Validation rules

After setting validation rules for a data set. Under data entry, Is it possible for DHIS2 to flag and not save a value when it violates a rule?. I have noted that even if the value entered violates a rule it saves the value in the database. How can I go about it?

Welcome to the community @ekmshali! What I know is that every value entered is saved into the database; however, it only appears in reports once the complete button has been pressed. Additionally, the field appears in red color
image when violating the validation rules.

What I understand from your question is that you want to stop the user from pressing complete if validation rules are complete? I think there is a setting configuration for this, but I will need to check.

Or are you asking that if the value violated the validation rule, it is erased once the user moves to the next field (or refreshes the page)? I think for this you will need to create a feature request in Jira but you can discuss this with the community.

Based on your answer, I will see how to support you and whom to contact. Thank you!

I also believe this should be in the #implementation category because you’re not facing a technical issue, right?

Hi @ekmshali the short answer is no there is not a way to prevent data from saving if it is entered into a data set. All values entered into a data set are viewable in the analytics apps after the analytics tables have run regardless of any validation rule violations or marking the data set complete.

There is a setting in the data set configuration in the maintenance app to only all the data set to be marked complete is validation passes. See screen shot below. Please note that marking the data set complete is how DHIS2 assess reporting completeness of the data set. The value will still be saved and viewable in analytics even if the data set is on complete. You can block data from being seen in analytic only through approval levels.


1 Like

Thank you this is very helpful.

1 Like