Archana Bongale
Posts: 0
Joined: Tue Jul 01, 2014 3:53 am

Advanced sorting on database query

Hello
I have following items in my collection

EventName: EVENT 1
EventStartDate: 02/01/2015
EventEndDate: === 02/18/2015
EventDays === [Mon, Friday, Saturday]

EventName: EVENT2
EventStartDate: 02/01/2015
EventEndDate: === 02/28/2015
EventDays === [Mon, , Thu]

I want to display all the events using list in a chronological order by doing some advanced sorting.
e.g. List should display based on the current date the next immediately available event , first in the list. Sorting should be done by considering the current date. Basically I am trying to get the current date and day of the week and comparing it to
listitems.

In the above example if today date is 02/11/2015, then list should show EVENT2 as first event and then EVENT1 as the second.

I have seen in your examples sorting can be achieved by passing one or more columns in collections. But I need to do some processing on the results after the sorting to get the exact effect that I want to achieve.

Can you give me some suggestion on how to do this using Appery?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Advanced sorting on database query

Hello!

You have to invoke JS to your mapping to do some processing on the results after the sorting. You can learn more about js invoking here http://devcenter.appery.io/documentat...

Return to “Issues”