Is it possible to assign a new value to a TEA?
So I have a program rule that assigns a value “1” to a TEA when a certain condition is true. In the next event, a different program rule needs to assign “2” to this TEA. Currently this is not working but I’ve tested the rules separately and a value can be assigned for both if the TEA had no value previously. Does anyone know how to fix this? (Summary below)
Event 1: Program Rule A assigns “1” to TEA
Event 2: Program Rule B assigns “2” to the same TEA
Nope. It was actually set using values entered in a program stage and it works! What doesn’t work is assigning a new value to a TEA when it’s already set.
Can you please specify, what DHIS2 version are you using?
If you have your first event together with the enrollment stage in the tracker dashboard, it is possible to assign a value from the event to the TEA and overwrite it if needed.
After clicking “Save and Continue”, you will not be able to reassign values to the TEA from the program stage dashboard anymore.
If the program is designed so that the enrollment happens first (Save and Continue), and then you access the program stage, it is not possible to assign values to TEAs from the program stage dashboard.
Right Clara but I think @YuryR means to say that once a value has been assigned to the TEA (so if it has previous assignment,) “it is not possible to change the value of a TEA from the program stage dashboard.”
(Thinking out loud)I guess another hack-fix would be to create an audit log, in essence, through multiple TEAs. Could hide them based on value, so that only one appears, as well. so something like:
If d2:hasValue(TEA1) && TEA1!=DE in PStage1, action=DE in PStage1 assigned to TEA2
and then in the enrollment–if d2:hasValue(TEA2), action=Hide TEA1
–if !(d2:hasValue(TEA2),action=Hide TEA2
Would it be possible to use Data Elements and then assign the final value to a TEA at the end of it all? It’s not very easy not knowing the use case (not the technical steps but the objective and desired result)