Program rule not working after many attempts

Hi all,
Iam using DHIS 2 version 2.33
I have a tracked entity attribute named Case type and an option set attached to it. The options codes are: Apoio, Adesao and Perda.
I have built a program rule that hides another attribute if Case type is Apoio or Adesao and below is the program rule expression I have used but it does not work.

Being puzzled, I deleted the option set, recreated and attached it again to the attribute but till now there is no result.

Thanks

He @hernandezmachava, I Think In this case you don’t have to test if Case Type has a value, you just have to test Case Type is Apoio or Adesao. So you can remove d2:hasValue(A{Case Type}).

Hi @hernandezmachava,
Have you checked the “use option code” in the rule variable variable Case type?

Hi @didate,

I have removed d2:hasValue(A{Case Type}) but it still does not work.

Thanks

Hi @Pablo,

I had not checked use code for option set. Although I have checked it now, the PI is not working. The option codes are also as you can see in the image below:

image

Thanks

You might be suffering from this bug: [DHIS2-9854] - Jira

For a temporary fix you could try to use your expression as:
d2:hasValue(#{Case Type}) && (... )