Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Query no longer returns data

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...

Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

Query no longer returns data

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

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Query no longer returns data

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Query no longer returns data

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

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Query no longer returns data

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.

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Query no longer returns data

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 + '"}}';

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Query no longer returns data

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.

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Query no longer returns data

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!

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Query no longer returns data

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Query no longer returns data

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.

Return to “Issues”