Page 1 of 1

Query no longer returns data

Posted: Tue Mar 10, 2015 4:32 pm
by Joe Bohen

I have a query that has worked for some time which no longer returns data! From chrome tools I am able to see that the query has not changed but no data is returned, the query uses a where clause to limit the data:

where:{"account":"GBA", "driver":"JBOHEN", "complete":"false"}

If I paste the where clause into the test section of the service I get the data I am expecting. Please see the image below.

The query which returns no data:

http://gyazo.com/97226619989c2d97541b...

The test which returns data:

http://gyazo.com/7abd870f7de13ff188ee...


Query no longer returns data

Posted: Tue Mar 10, 2015 9:00 pm
by Egor Kotov6832188

Hello Joe,
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


Query no longer returns data

Posted: Wed Mar 11, 2015 6:36 pm
by Joe Bohen

I have sent two emails the first confirming that the app has been shared. Do you have any updates on this question?


Query no longer returns data

Posted: Thu Mar 12, 2015 3:11 am
by Yurii Orishchuk

Hi Joe,

Please specify here your App name.

Also:

  1. Use "$and" or "$or" clause to combine your criteries.

    For example:

    {"$and": { "account":"GBA", "driver":"JBOHEN", "complete":"false" } }

  2. On screen shot you show us "options" request. This request does not return any useful user data. You need to see further "get" request.

    Regards


Query no longer returns data

Posted: Thu Mar 12, 2015 7:06 am
by Joe Bohen

Hi, what has changed this query has been successful for over two years and is still working with exactly the same structure in an old version of the app which has the same query!

I sent the information you asked for from the priority support option in the designer which confirmed that the email had been sent although I did not receive an auto confirm email from you, is this broken?

The app name is TransApp V2 the login is:

user: j.bohen
pass: TEST123

the query is the jobService on the jobslist_pge which should return data for that login.


Query no longer returns data

Posted: Thu Mar 12, 2015 8:58 am
by Joe Bohen

I attempted the inclusion of the expression you suggested and I got the error:

code: "DBSQ250"
description: "$and expression must be a nonempty array"

The code I use to return the where clause:

var A = localStorage.getItem('user');
var D = localStorage.getItem('driver');
var F = 'false';
return '{"$and":{"account":"' + A + '", "driver":"' + D + '", "complete":"' + F + '"}}';


Query no longer returns data

Posted: Fri Mar 13, 2015 3:13 am
by Yurii Orishchuk

Hi Joe,

Please try following JS code:

pre

var A = localStorage.getItem('user');
var D = localStorage.getItem('driver');
var F = 'false';

var whereObject = {"$and":
[
{"account": A},
{"driver": D},
{"complete": F}
]};

return JSON.stringify(whereObject);

/pre

Regards.


Query no longer returns data

Posted: Fri Mar 13, 2015 8:13 am
by Joe Bohen

Hi Yuri,

That is the solution to my immediate problem, but it creates a lot of others as the data is now returned in a different structure to before and I am not mapping the results but working in code with the returned data!


Query no longer returns data

Posted: Fri Mar 13, 2015 8:27 am
by Joe Bohen

Hi Yuri,

That has fixed the issue, originally I thought the data was being returned differently, but this was not the case! Why has the query changed is it due to the jquery upgrade?

Thank you for your assistance,
Joe


Query no longer returns data

Posted: Mon Mar 16, 2015 1:37 am
by Yurii Orishchuk

Hi Joe,

To combine logic you should use "$and" or "$or" . Before you use not specified combination, thus you got this issue after update.

Regards.