How I do a query with a local storage?
Where I have to put a JS?
I want to do something like it:
Select name from places where idusuario=id_usuario(<-local storage)
How I do a query with a local storage?
Where I have to put a JS?
I want to do something like it:
Select name from places where idusuario=id_usuario(<-local storage)
Hello,
This docs should help:
http://docs.appery.io/documentation/u...
http://docs.appery.io/documentation/b...
Hello, thx for help, but i still confused
I'm trying everything. Can you show a step by step way?
I have created a Places_places_query_service. On the request parameters i have a where parameter with empty default value, I have to change this parameter?
if you use empty value in the where clause it will return all record from DB.
For example if you want to find the object with some ID you should do next:
put object value to localStorage variable;
map localStorage variable to where parameter;
add JS code to where parameter:
pre
return '{"_id": "' + value + '"}';
/pre
_id - column name from your DB collection
This tutorial will help you to find all information that you need.
http://docs.appery.io/tutorials/build...
Thanks!
Hi Igor,
I'm having a problem doing a query with local storage. I've used the same code (adapting to my column name) but it is returning "undefined".
I've checked the local variable pointing the response to a Label on the UI and it's being saved correctly.
But the query doesn't work.
Hi,
Answered here https://getsatisfaction.com/apperyio/...
How is this done if I want to use multiple values in an "and" query?
return '{"_id": "' + value + '"}';
Can only be used for one locale variable.
What if I want two or more?
Oli
Hello Oliver,
Please look at this documentation:
https://devcenter.appery.io/documenta...
Hi Sergiy,
Thanks for that but I could see lots of information about explicitly stated comparisons but nothing about using local storage.
Likewise all the queris are written as though directly querying the database in code whereas the +value+ part is used in the app builder with the visual mapping.
Oliver