# Unable to trigger program rule to hide program stage

**URL:** <https://community.dhis2.org/t/unable-to-trigger-program-rule-to-hide-program-stage/4649>\
**Category:** Support - Assistance technique\
**Created:** [18 October 2017 04:47 UTC](https://community.dhis2.org/t/unable-to-trigger-program-rule-to-hide-program-stage/4649 "2017-10-18T04:47:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shurajit\_Dutta](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/shurajit_dutta/32/31781_2.png) [@Shurajit\_Dutta](https://community.dhis2.org/u/Shurajit_Dutta)\
**Post date:** [18 October 2017 04:47 UTC](https://community.dhis2.org/t/unable-to-trigger-program-rule-to-hide-program-stage/4649/1 "2017-10-18T04:47:34Z")

</div>

Hello all,

Am having difficulty triggering the program rule to hide a program stage. I have tried a couple variations using latest 2.28 and none seem to be working.

In this example, I have a measles case investigation stage that I want to hide unless the initial diagnosis is measles. I set up the variable to be “data element from the newest event in the current program” and I am **not** using the codes for the option set as I am displaying this initial diagnosis information in the feedback widget regardless of what program stage has been selected.

My expression is as follows:

#{initialdiag} != ‘Measles (B05.0-B05.9)’

I used that expression to successfully hide a section unless measles is selected within the same program; however the program stage does not hide.

Any suggestions?

Thanks,

Nick

---

<div class="post-metadata">

**Author:** ![Shurajit\_Dutta](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/shurajit_dutta/32/31781_2.png) [@Shurajit\_Dutta](https://community.dhis2.org/u/Shurajit_Dutta)\
**Post date:** [18 October 2017 04:51 UTC](https://community.dhis2.org/t/unable-to-trigger-program-rule-to-hide-program-stage/4649/2 "2017-10-18T04:51:09Z")

</div>

Sorry seems I had two rules with the same expression, and therefore only one action was triggering. My mistake!

> **···**
>
> On Wed, Oct 18, 2017 at 12:47 AM, Shurajit Dutta [shurajitdutta@gmail.com](mailto:shurajitdutta@gmail.com) wrote:
> 
> > Hello all,
> 
> > 
> 
> > Am having difficulty triggering the program rule to hide a program stage. I have tried a couple variations using latest 2.28 and none seem to be working.
> 
> > 
> 
> > In this example, I have a measles case investigation stage that I want to hide unless the initial diagnosis is measles. I set up the variable to be “data element from the newest event in the current program” and I am **not** using the codes for the option set as I am displaying this initial diagnosis information in the feedback widget regardless of what program stage has been selected.
> 
> > 
> 
> > My expression is as follows:
> 
> > 
> 
> > #{initialdiag} != ‘Measles (B05.0-B05.9)’
> 
> > 
> 
> > I used that expression to successfully hide a section unless measles is selected within the same program; however the program stage does not hide.
> 
> > 
> 
> > Any suggestions?
> 
> > 
> 
> > Thanks,
> 
> > Nick
> 
> > 
> 
> –
> 
> Shurajit Dutta  
> Health Information Consultant
