Program rule variables source types

Hi everyone,

In practice, what is meant by these two source types? I have read the documentation, but I still can’t understand their use.




Hi @hernandezmachava,

I will try to explain this differently but please don’t hesitate to tell me if the following explanation doesn’t help much and what answer you expect: :+1:

The “Data element in current event” source type will retrieve the value of the Data Element in the open event (not a closed event) i.e. during data entry. In practice, this helps to show warning, hide fields, and different actions that need to be taken during the data entry based on the entered value in an open event form and before closing it. For example, if data element Sex = ‘Male’ then the action would be hide the field ‘pregnant’, right?

The second source type, “Calculated value” (unlike the four other source types above) doesn’t depend on the value of a Data Element, and instead, it depends on a calculated value assigned to it from another program rule. In practice, you will use this source type when you need a value that is not directly entered into the form and is calculated based on other program rule/s.

Hope this helps! :+1:


Hi all,

Can anyone give me practical examples of when to choose either of the following program variables source type? I don not understand the explanation in the DHIS documentation.


Hi @fernandoshake ,
Thank you for your question! You can find training videos here:

In this video you’ll find a practical example for source type: 'Data element in current event’

And continuation to learn about the other options:

Hope this helps! Thanks! (: