You are referring to the program rule expression, right? Please use #{variableName} which is what you will find in the UI if you navigate to the program rule expression configuration from the Maintenance app.
If you use the hidefield it should completely hide the field. Could please share steps to reproduce this hidefield expression (in the most basic way) in any of the play.dhis2.org instances?
(As for the repo, I’m not sure how that relates to the DHIS2 metadata question, thanks!)
(not just grayed out, the validation is run on the “hidden fields“ when I expect that rule to be applied only for displayed fields)
[UPDATE]: by removing the mandatory on the program DE definition it seems to work better, but it means I need to double the rule, one for hiding, one for making it mandatory
Thanks for the clarification, so if I understood the issue with IDs was that the API requests were working as expected but when testing in the UI, it was a cache issue that made things appear to be not working.
Sorry, these type of links to the play instances eventually stop working so next time I will make sure to request either screenshot or written steps.
I suppose that if the rule has the correct expression, the actions don’t need to be separated into several PRs. I wonder what’s causing this? What about the hidefield option, did it work?
Actually I think it is needed to have 2 PR because the logic is opposed relevance == False to hide and relevance == True to make it mandatory; did I missed something ?
regarding the issue, HIDEFIELD PR does not work properly on mandatory DE; but having them not working at alll will be better than falling back in DISABLEFIELD.
I am still fine-tuning the script because there are constraints that I need to overcome; for instance I need to make empty-section so I can show recommendation message (it is not a data capture so it has no DE); if you have suggestion to show pictures I am all ears.