Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Sorting database results from a service

Do you have an example?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Sorting database results from a service

Unfortunately we do not have ready example.

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Sorting database results from a service

Is it possible for it to ignore case when it sorts?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Sorting database results from a service

Hi Ellen,

Unfortunatly it's not possible for this time.

All available functionality about "sort" you can find here: https://devcenter.appery.io/documenta...

Regards.

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Sorting database results from a service

I seem to be having an issue when trying to do a simple sort. I have a list that is being populated from a collection and I would like it sorted by account_name which is a string. I checked the case, for typos, and made sure it is on the right tab (query string, request).

http://i.imgur.com/vSCZ97d.png

This seems pretty simple, but I must be missing something. Can you help me please?

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Sorting database results from a service

I have found that replacing the desired sort value of "account_name" with "-account_name" returns the collection in opposite order they were created.

Also, sorting works on all the other fields as expected, just not account_name.
I hope that helps.

http://i.imgur.com/hVlAIOD.png

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Sorting database results from a service

I have seemed to fix the issue by deleting the data in the collection and re-running the test. All is fine now, and I would suppose that editing the collection structure between row entries caused the issue.

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Sorting database results from a service

how would I sort by one of the the included object's values?

Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Sorting database results from a service

There no way to sort data by included objects using mongoDB, but you can use JS for that. Just use service's response from the service's sucess event

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Sorting database results from a service

I'll have to look into that. Thank you.

Return to “Issues”