Data value from previous Data element event

Hi, everyone.

I have a program with a single repeatable stage

I have a data element (test result) that contains an option set (Positive and Negative).

I intend to create a new event, but in this new event, the system should assume the value of the previous event.

Exercise done:

I created a program rule variable (“resultadoHIVprevious”) with the source type “Data element from the previous event”, and the Data Element “test result”.
I created another program rule variable (“resultadoHIVprevious”) with the source type “Data element from the newest event in the current program”, and the Data Element “test result”.
Program Rule:

Condition: #{resultadoHIVprevious} == true

Action
Assign value

Data Element to assign to : test result
Expression to evaluate and assign
#{resultadoHIVprevious}

But is not working.

Hi @dguambe

Welcome back to the community!

I don’t understand why the two program variables have the same name?


However, the data element “test result” is not a true/false, it’s a “Negative” or “Positive” so maybe it’s not working because of the comparison with ‘true’?