Page 1 of 1

Advanced sorting on database query

Posted: Fri Feb 20, 2015 2:30 pm
by Archana Bongale

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?


Advanced sorting on database query

Posted: Fri Feb 20, 2015 4:51 pm
by Maryna Brodina

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...