← Back to team overview

dhis2-users team mailing list archive

Program Rule Expression Executing Before being Called


Dear Experts,

I trust you are well. I defined a set of program rules for a tracker-based program stage whose data elements have option set coded between 0-3. Conditions were set for these option set to calculate scores using suggested syntax, however, the program stage is registering the scores before the user clicks the options. If the user clicks the correct answer the score remains the same but if wrong answer is chosen, the score reduces(which is accurate). The issue is how to make score register only on-click and not before.

Also, note that priority were set for the levels of scoring and the function d2:HasValue( '  ') has been used to solve this issue, but its all to no avail. Kindly suggest how best to solve this issue.

Thank you,

Oladiran Olakunle

Follow ups