← Back to team overview

dhis2-users team mailing list archive

Re: changing aggregation operator and deleting data elements

 

Hey Morten,

It seems the dataElement endpoint does not allow the aggregationType to be
changed?

Sending a PUT payload of the object with the aggregationType set to
'AVERAGE' from 'SUM' returns successfully. It does however not update the
value correctly.

Is this intended? Is one not supposed to change the aggregateType?

Regards,

Mark

On Thu, Mar 3, 2016 at 3:25 PM, Jason Pickering <jason.p.pickering@xxxxxxxxx
> wrote:

> Hi Thomas,
>
> Which version are you using? Are you using the French translation?
>
> Are you able to reproduce it on the demo instance?
>
> Best regards,
> Jason
>
>
> On Thu, Mar 3, 2016 at 3:20 PM, Thomas Lavreys <thomaslavreys@xxxxxxxxx>
> wrote:
>
>> Hi All,
>>
>>
>>
>> I created a data element ‘new respiratory disease cases’, however, after
>> filling in my data I realized I put the aggregation operator to ‘Sum’
>> instead of ‘Average (sum in org unit hierarchy)’ meaning I can’t create any
>> incidence rates. Consequently, I changed this from Sum à Average (sum in
>> org unit hierarchy), but nothing really changed, and when I looked back at
>> the details of my data element, the aggregation operator was set to ‘Sum’
>> again. Is this a bug or is this something that just can’t be changed, at
>> least when data has already been filled in?
>>
>>
>>
>> I also tried another approach, deleting the data element. However, I just
>> get an error message saying: Could not delete due to association with
>> another object: DataValue. Does this mean I have to delete all the data
>> connected to this data element? And would I have to do anything else before
>> I can delete the data element? I tried to find if anyone else asked the
>> same question in the past, but there seems to be little info about this on
>> the web, and it could be handy to know this if I were to create data
>> elements that need to be deleted in the future.
>>
>>
>>
>> Thanks in advance!
>>
>>
>>
>> Kind regards,
>>
>>
>>
>> Thomas Lavreys
>>
>>
>>
>> Thomas Lavreys
>>
>> Maisha Consulting bvba
>>
>> Bisschoppenhof 9
>>
>> 3150 Tildonk
>>
>> Belgium
>>
>>
>>
>> Tel: +32-16-850242
>>
>> Cell phone: +32-474-717641
>>
>> Fax: +32-16-850242
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Jason P. Pickering
> email: jason.p.pickering@xxxxxxxxx
> tel:+46764147049
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References