Charles Whitcombe
Posts: 0
Joined: Sun Nov 10, 2013 7:48 pm

Since update list items from database service don't show.

Hi. My app no longer works in preview or on my phone since the update on Monday.

The problem is where under 'featured' and 'exchange' there used to be a list of items, now it doesn't render. There is filtering and when no DB items pass the filter, on the screen appears 'no results' as is the case under the 'saved' tab. But for the other two it just shows the 'refresh' and 'more' buttons suggesting it knows there's items to display that pass through the filters, it just doesn't.

Link:

http://appery.io/app/mobile-frame?src...

For login can use: email: a href="mailto:mimi@gmail.com" rel="nofollow"mimi@gmail.com/a password: mimi

Thanks.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Since update list items from database service don't show.

Hello! We'll check and let you know.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Since update list items from database service don't show.

Date format in Where parameter shouldn't include "T" and "Z". Try to delete them the following way. For dateStrZ variable for example predateStrZ.replace("T"," ").replace("Z","");/pre

Charles Whitcombe
Posts: 0
Joined: Sun Nov 10, 2013 7:48 pm

Since update list items from database service don't show.

Ok will look at this but any reason why I should have to change this now after it has worked fine for a month or so prior to the update?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Since update list items from database service don't show.

Hi Charles,

There is also a problem in your code:predateStrZ.replace("S", " ").replace("Z", "");
dateStrS.replace("S", " ").replace("Z", "");

var dz = new Date();
dz.setDate(dz.getDate());
var dateStrZ = dz.toISOString();

var ds = new Date();
ds.setDate(ds.getDate() - 7);
var dateStrS = ds.toISOString();/preIn first two lines you modify variables that get a value later.

Charles Whitcombe
Posts: 0
Joined: Sun Nov 10, 2013 7:48 pm

Since update list items from database service don't show.

Hi Katya,

Yeah, sorry put in those lines -

dateStrZ.replace("S", " ").replace("Z", "");
dateStrS.replace("S", " ").replace("Z", "");

as I'm experimenting with Maryna's suggestion above. I didn't have them before when the app worked.

I've put:

var dz = new Date();
dz.setDate(dz.getDate());
var dateStrZ = dz.toISOString();

var ds = new Date();
ds.setDate(ds.getDate() - 7);
var dateStrS = ds.toISOString();

console.log(dateStrS);
console.log(dateStrZ);

dateStrZ.replace("T","").replace("Z","");
dateStrS.replace("T","").replace("Z","");

console.log(dateStrS);
console.log(dateStrZ);

at the end of the code you've pasted above but still doesn't work - the 'T' and 'Z' is still in the date string (shown in console):

2014-01-15T18:27:46.900Z
2014-01-22T18:27:46.900Z
2014-01-15T18:27:46.900Z
2014-01-22T18:27:46.900Z

Thanks!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Since update list items from database service don't show.

Hi Charles,

Sorry, here is the correct code:predateStrZ = dateStrZ.replace("T","").replace("Z","");
dateStrS = dateStrS.replace("T","").replace("Z","");/preMethod replace() for a string doesn't change an initial string, it returns a new one.

Charles Whitcombe
Posts: 0
Joined: Sun Nov 10, 2013 7:48 pm

Since update list items from database service don't show.

Ok that changes things a bit - but now have error code "DBSQ000".

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Since update list items from database service don't show.

Hello! I'm sorry for misunderstanding. Do not delete T and Z symbols. Instead pre{"columnName":{"$gte":{"$date":"' + dateVariable + '"}}}/pre use pre{"columnName":{"$gte":"' + dateVariable + '"}}/pre

Charles Whitcombe
Posts: 0
Joined: Sun Nov 10, 2013 7:48 pm

Since update list items from database service don't show.

Thanks Maryna - that's done it!

Return to “Issues”