Make field mandatory program action not working

Hi all,

I created program rules to make some fields mandatory, but they are not working. This is how the PR expression and rule action of one of the program rule look like:


Hello, Fernando Shake.

In response to your inquiry, I recommend that you make the data elements assigned to your program stage compulsory, as opposed to creating program rules.

I hope our response is able to solve the issue you were facing.

With :hearts: from the Dhistance Team. The Easiest DHIS2 Setup system. Up and running in 5 minutes!

No technical knowledge needed! Great Support with Data Security/Confidentiality.

Hi @e4eDHIS2,

We opted for this path because all data elements made mandatory in a program stage could not be hidden using program rules in android. in other words, we created some program rules to hide data elements which are mandatory, but the PRs do not work in android. In this case what can we do?


Hi @fernandoshake

Can you try to change the rule expression to something different than true? I´d suggest something like d2:hasValue(V{event_date}) to test.

Android won´t hide required fields. If you leave that expression you will never be able to hide them (depending on priorities).

Can you elaborate a little bit more on your use case?


1 Like