dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #09456
Re: Regarding Data sort through an APi
Thanks for the reply Morten,
I have tried with order parameter also but still getting the same order.
Here suppose I want to sort all the dataelements under Anaemia(KmwPVkjp7yl)
group like:
https://play.dhis2.org/demo/api/dataElementGroups/KmwPVkjp7yl?fields=dataElements[id,name]&order=name:asc
Here output should be:
Admission Date
Albendazole given at ANC (2nd trimester)
Anaemia follow-up
Anaemia new
Anaemia new
But actually it is coming in different order.
Thanks.
On Mon, Feb 29, 2016 at 3:08 PM, Morten Olav Hansen <morten@xxxxxxxxx>
wrote:
> I assume you mean metadata (from your examples). Yes, you can use the
> order parameter, please have a look at [1].
>
> [1]
> http://dhis2.github.io/dhis2-docs/master/en/developer/html/ch01s06.html
>
> On Mon, Feb 29, 2016 at 3:48 PM, Sourabh Bhardwaj <bsourabh191@xxxxxxxxx>
> wrote:
>
>> Hi all,
>>
>> Can we sort data getting through an Api, I am trying using sortOrder but
>> it did not helped.
>>
>> Following is the complete url:
>>
>>
>> https://play.dhis2.org/demo/api/dataElementGroups?fields=dataElements[id,name]&sortOrder=ASC
>>
>> OR
>>
>>
>> https://play.dhis2.org/demo/api/dataElementGroups?fields=dataElements[id,name]&sortOrder=DESC
>>
>> Want to sort all the dataelements alphabetically or in some random
>> required order which we can define in Api only(say sort by dataelement or
>> sort by name etc.)
>>
>> Thanks & Reagrds,
>> Sourabh Bhardwaj.
>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
>
> --
> Morten
>
Follow ups
References