Page 1 of 1

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

Posted: Tue Jan 21, 2014 9:17 am
by Charles Whitcombe

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.


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

Posted: Tue Jan 21, 2014 10:34 am
by Maryna Brodina

Hello! We'll check and let you know.


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

Posted: Tue Jan 21, 2014 10:58 am
by Maryna Brodina

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


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

Posted: Tue Jan 21, 2014 12:33 pm
by Charles Whitcombe

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?


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

Posted: Wed Jan 22, 2014 5:23 pm
by Kateryna Grynko

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.


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

Posted: Wed Jan 22, 2014 6:31 pm
by Charles Whitcombe

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!


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

Posted: Thu Jan 23, 2014 10:41 am
by Kateryna Grynko

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.


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

Posted: Thu Jan 23, 2014 1:08 pm
by Charles Whitcombe

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


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

Posted: Thu Jan 23, 2014 8:44 pm
by Maryna Brodina

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


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

Posted: Fri Jan 24, 2014 4:40 pm
by Charles Whitcombe

Thanks Maryna - that's done it!