Page 1 of 1

Distinct Query with a limit

Posted: Fri Nov 04, 2016 9:56 pm
by Austin Troth

I am using a query to locate a distinct value among a list. I can get that part to work. But I only want to retrieve the top 5 results. On my other queries I just use the Limit request but that does not seem to work on the district query. Is there something I am doing incorrectly or is this not possible? Thanks

Image

Image


Distinct Query with a limit

Posted: Mon Nov 07, 2016 8:48 am
by Serhii Kulibaba

Hello,

It is a limitation of the mongoDB: it is impossible to use limit/offset parameters in distinct requests: http://stackoverflow.com/questions/16...

Please use that filtration on the Server Code:
https://docs.appery.io/reference#serv...
In that case you'll be able to get limit amount of it's values in the app