Page 2 of 2

Sorting issue with database

Posted: Sat Dec 05, 2015 5:31 am
by Deon

Hi

Descending sort does not work by adding a - in front of the sort parameter.

ie. If you want to sort on a field called Date, you cannot add -Date in the parameter value. Date by itself will sort in Ascending order fine.

What is needed to sort in descending order?


Sorting issue with database

Posted: Mon Dec 07, 2015 1:28 pm
by Serhii Kulibaba

Could you clarify what you have tried and what exactly does not work? It seems to work in my app: http://prntscr.com/9bcdtd


Sorting issue with database

Posted: Tue Dec 08, 2015 4:55 am
by Deon

Hi Sergiy

I think it is because I am connecting to an MSSQL database and it does not know how to interperet the -


Sorting issue with database

Posted: Thu Dec 10, 2015 12:17 pm
by Serhii Kulibaba

MSSQL doesn't use property "sort". Please use ORDER BY for that: https://msdn.microsoft.com/en-US/libr...


Sorting issue with database

Posted: Sun Dec 13, 2015 4:09 pm
by Deon

Thank you. I will try that, however using sort works if you are sorting ascending.


Sorting issue with database

Posted: Thu Jun 23, 2016 9:10 pm
by Alberto da Silva

how do you sort desc?


Sorting issue with database

Posted: Mon Sep 05, 2016 2:19 am
by Guatemala Produtora

Same issue here.
There's anyone who had solved it?

Guilherme


Sorting issue with database

Posted: Mon Sep 05, 2016 9:52 am
by saurabh8122815

Hi Guatemala Produtora,

which database you use for sorting. Appery db or other.

If appery database use, perform server code using - query parameter u have get as you want ascending or descending result.


Sorting issue with database

Posted: Mon Sep 05, 2016 2:26 pm
by Guatemala Produtora

Hi Saurabh.

I tried that way before and didn't work. Do you know any java command (or an alternative method) that performs the same sort action?

Thanks in advance.


Sorting issue with database

Posted: Mon Sep 05, 2016 8:19 pm
by Guatemala Produtora

Thank you!