Page 1 of 2

where clause problem

Posted: Thu Jun 11, 2015 11:09 am
by LukeM

Hi,

I cannot get a query with a WHERE clause to work in my app. The strange thing is it works just fine in the Editor Test, but not when I wire it up in the 'app'.

First screenshot below shows testing in the Editor, it works fine.

Second screenshot shows how I'm trying to wire it in the app, this fails, even though I test with the same hardcoded where clause:

{"time_of_next_status_change": {"$lt":"1433968469762"}}.

Any ideas where I'm going wrong here will be much appreciated.
Image

Image


where clause problem

Posted: Thu Jun 11, 2015 1:19 pm
by Serhii Kulibaba

Hello,

What errors do you get in application? Could you check are there any errors in console? This (http://devcenter.appery.io/documentat...) should help.


where clause problem

Posted: Thu Jun 11, 2015 2:04 pm
by LukeM

hi, in the chrome dev console I get 400 (Bad Request):

api.appery.io/rest/1/proxy/tunnel?sort=-status%2C+-time_of_next_status_chan...e_of_next_status_change%22%3A+%7B%22%24lt%22%3A%221433968469762%22%7D%7D:1 GET https://api.appery.io/rest/1/proxy/tu... 400 (Bad Request)

Image

In weinre I see this:

{"code":"PTCT022","description":"Error while sending request: Failed to create URI: https://api.appery.io/rest/1/db/colle...\": \u0006\""$lt\"":\""1433968469762\""\u0007}""}"


where clause problem

Posted: Tue Jun 16, 2015 7:49 pm
by LukeM

Hi, any thoughts on what the solution is? I see several similar posts with issues relating to:

code: "PTCT010",
description: "Mandatory parameter 'appery-rest' is missing"

across the forum, but it's not clear what the cause/answer is. tnx.


where clause problem

Posted: Wed Jun 17, 2015 5:15 am
by Evgene Karachevtsev

Hello Luke,

We are sorry for delay, we're working on it at the moment and will get back to you with the update.


where clause problem

Posted: Thu Jun 18, 2015 7:49 pm
by Serhii Kulibaba

Please share (http://devcenter.appery.io/documentat...) your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and provide us with the following information:

1) App name
2) Test credentials if login functionality is implemented in your app
3) Detailed steps to reproduce the issue


where clause problem

Posted: Thu Jun 18, 2015 9:06 pm
by LukeM

Thanks, app shared and details sent via email.


where clause problem

Posted: Fri Jun 19, 2015 7:45 am
by LukeM

Great, your advice worked, much appreciated :-)

Please use following where value instead of yours:

{"time_of_next_status_change":{"$lt":1433965636}}

$lt and $gt operators works with "date" or "number" field. So if you have there number type field you need to pass number value.


where clause problem

Posted: Fri Jun 19, 2015 7:46 am
by LukeM

Can I suggest that you make a change to the Test console so that it would catch my error, rather than succeed. many thanks.


where clause problem

Posted: Fri Jun 19, 2015 8:50 am
by Alena Prykhodko

Hello,

Please clarify have you managed with this?