Page 1 of 1

Getting tricky over here, can I do this?

Posted: Tue Dec 17, 2013 12:19 pm
by Jason Baird

I have a collection that has just 1 column with numbers 5 - 1000 of type number and indexed. This will be used in a service type list and will populate a list or select, not sure which yet. What I'd like to do is pass an argument where I will only retrive a certain amount of them.

Psudo....

if x is = this query and get range 5 - 100
if x is = something else range 5 - 500

I'm looking for the easiest way to do it? Maybe this isn't even the best way? Suggestions would be useful.


Getting tricky over here, can I do this?

Posted: Tue Dec 17, 2013 12:50 pm
by Maryna Brodina

Hello! Please take a look here http://docs.appery.io/documentation/b... (Query Constraints section).


Getting tricky over here, can I do this?

Posted: Tue Dec 17, 2013 2:47 pm
by Jason Baird

Ok yeah, I get that part. But basically I want to do....

Psudo...

{"column1": value between 5 to 100}


Getting tricky over here, can I do this?

Posted: Tue Dec 17, 2013 4:40 pm
by Kateryna Grynko

Hi Jason,

Add request parameter 'where' with the following value please:pre{"column1":{"$gte":"5", "$lt":"100"}}/pre