LukeM
Posts: 0
Joined: Sat Nov 15, 2014 4:43 pm

where clause problem

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

where clause problem

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.

LukeM
Posts: 0
Joined: Sat Nov 15, 2014 4:43 pm

where clause problem

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}""}"

LukeM
Posts: 0
Joined: Sat Nov 15, 2014 4:43 pm

where clause problem

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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

where clause problem

Hello Luke,

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

where clause problem

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

LukeM
Posts: 0
Joined: Sat Nov 15, 2014 4:43 pm

where clause problem

Thanks, app shared and details sent via email.

LukeM
Posts: 0
Joined: Sat Nov 15, 2014 4:43 pm

where clause problem

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.

LukeM
Posts: 0
Joined: Sat Nov 15, 2014 4:43 pm

where clause problem

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

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

where clause problem

Hello,

Please clarify have you managed with this?

Return to “Issues”