Assign one date element value to other data element of aggregate type

I have one data element of aggregate type date wise under data set 1
and another data element of aggregate type under data set 2
Can I assign value of one element to another of different data set
means only once I enter the data in data set 1 element will fill to data element of data set 2

dhis version 2.31

2 Likes

@Harish this is possible in tracker with program rules to assign a value based on another value. In aggregated datasets this can be achieved but to my knowledge not in the UI but with something like a SQL script that you schedule to run with a cron job or a nodejs service which can be triggered by an event e.g the value being filled. Though practiced in some scenarios including by us you should note that SQL are not necessarily the best way to achieve this as it can be risky so all precautions advised if you want to go that route. We now moving towards using the Nodejs service more Something simpler for example to extract data out for element 1 and 2 and preparing an import file for element 2 (csv, xml or json) may also work though that requires continued maintenance to import.

Regards
Elmarie

1 Like