Page 3 of 3

Query Service??

Posted: Thu May 16, 2013 7:57 pm
by Maryna Brodina

:) you can find a lot of source information in the internet. You can take a look here http://www.w3schools.com/js/

Appery.io documentation
http://docs.appery.io/documentation/a...


Query Service??

Posted: Thu May 16, 2013 8:05 pm
by Stephen Goveia

Thanks again...!! :)


Query Service??

Posted: Fri Jul 12, 2013 6:19 pm
by Ralph Smith

Hi everyone. I'm looking at this post because I have the same problem. Thanks for the example. I have exactly the same situation and have implemented the code just like you have here.

return '{"user_id": "' + localStorage.getItem("local_user_id") + '"}';

But I still get every record in the collection rather than just the ones with who's user_id equals the local_user_id (local storage variable).

I've tested the fact that I have the right value in local storage by displaying it in a label.

I must have something else wrong. Any other hints?


Query Service??

Posted: Fri Jul 12, 2013 6:34 pm
by Stephen Goveia

Hey Ralph! I think the user_id is a string so you would want to use:

codereturn '{"user_id": ' + localStorage.getItem("local_user_id") + '}';/code


Query Service??

Posted: Thu Aug 29, 2013 11:56 am
by Helsen

hi Stephen, your solution don't work for me.

My poor solution with the same logic:

code
var local_user_id = localStorage.getItem("local_user_id");
var startString = "{'&quot
var fieldName = "user_id&quot
var midString = "':'&quot
var endString = "'}'&quot

return = startString.concat(fieldName,midString,local_user_id,endString);
/code


Query Service??

Posted: Thu Aug 29, 2013 2:40 pm
by Stephen Goveia

Did this work?


Query Service??

Posted: Fri Aug 30, 2013 11:08 pm
by Helsen

yes, thanks for your hint


Query Service??

Posted: Thu Apr 03, 2014 2:54 am
by Ralph Smith

Stephen. sorry it took so long to respond. I'm just logging back on to this system for the first time and noticed this. Yes, it worked perfectly!

Thanks again.