# Problem with program rule action

**URL:** <https://community.dhis2.org/t/problem-with-program-rule-action/49958>\
**Category:** Support - Assistance technique\
**Tags:** tracker\
**Created:** [5 October 2022 18:57 UTC](https://community.dhis2.org/t/problem-with-program-rule-action/49958 "2022-10-05T18:57:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jaime.bosque](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/jaime.bosque/32/42220_2.png) [@jaime.bosque](https://community.dhis2.org/u/jaime.bosque)\
**Post date:** [6 October 2022 10:04 UTC](https://community.dhis2.org/t/problem-with-program-rule-action/49958/2 "2022-10-06T10:04:52Z")

</div>

Hi @aitor_garrido

Regarding your first question. Yes, it is very straight forward to assing a “Yes” to a Data Element as you can see here.  
 ![program_rule_yes](https://dhis2.b-cdn.net/uploads/default/original/3X/a/8/a829dc796dc19afca4c5fecd9470fddd4b76422f.gif)

The example program rule (sorry for the rules not making really sense as I am reusing another program):  
Program Rules Variables:

 ![image](https://dhis2.b-cdn.net/uploads/default/original/3X/2/8/281d49fa295702483ecfe03b00d2301a8164db7d.png)

Expression:

 ![image](https://dhis2.b-cdn.net/uploads/default/original/3X/6/a/6a479bf688be69c405705713af7e50f7105c9bff.png)

Program Rules:

 ![image](https://dhis2.b-cdn.net/uploads/default/original/3X/2/e/2ecbed10673107d9005d847e094df6d1c70bf8e7.png)

Please note that when using Program Rules and assigning a value to Data Element this becomes greyed out so it cannot be changed (unless the Program Rule expression becames False).

---

_[View the full topic](https://community.dhis2.org/t/problem-with-program-rule-action/49958)._
