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

Query Service??

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

Stephen Goveia
Posts: 0
Joined: Fri May 10, 2013 3:35 pm

Query Service??

Thanks again...!! :)

Ralph Smith
Posts: 0
Joined: Thu Jul 11, 2013 7:41 pm

Query Service??

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?

Stephen Goveia
Posts: 0
Joined: Fri May 10, 2013 3:35 pm

Query Service??

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

Helsen
Posts: 0
Joined: Wed Jul 31, 2013 1:42 pm

Query Service??

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

Stephen Goveia
Posts: 0
Joined: Fri May 10, 2013 3:35 pm

Query Service??

Did this work?

Helsen
Posts: 0
Joined: Wed Jul 31, 2013 1:42 pm

Query Service??

yes, thanks for your hint

Ralph Smith
Posts: 0
Joined: Thu Jul 11, 2013 7:41 pm

Query Service??

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.

Return to “Issues”