Gary Lau
Posts: 0
Joined: Fri Apr 26, 2013 9:35 am

How to customise collection display by filters and ordering?

I'm trying to return a list of records into a table from a database collection based on:
1) filter by a certain date specified
2) ordered in descending order by time saved

I've looked at these two resources:
1) http://docs.appery.io/tutorials/build...
2) I've looked at http://docs.appery.io/documentation/b...

I'm still not clear on how to achieve this. I can get a list to display in my grid/table from a collection, but I don't know how to enter a filter or perform ordering on it. How do I enter the query constraints mentioned in the documentation?

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

How to customise collection display by filters and ordering?

Hello! To filter by a certain date specified you would need to add to DB service Request parameter "where" and transmit into this parameter your filter as json:

for example:
code{"date": "2013-01-20 01:01:11.000"}/code
date - field name with data

You can form more complicated requests - this should help http://docs.appery.io/documentation/b...

Return to “Issues”