Page 1 of 1

Where did the "set local storage variable" go?

Posted: Thu Oct 02, 2014 6:06 am
by Tobias

Hello,

new to appery io so I'm still following tutorials to get started on the right foot. In this tutorial: http://devcenter.appery.io/tutorials/... you show how to build a master list and open detailed pages on click for each list item. The key step is to pass the variable from one page to the other. In the tutorial you do that by entering a local storage variable name in the page's event tab.

I tried to do the same but there is no drop down point "set local storage variable" anymore (only "set storage variable) and under "set storage variable" the field only offers a drop down with storage variables defined for the database (I set one up following http://devcenter.appery.io/tutorials/...).

So where did the local storage variable go? Or does the feature no longer exist and we have to store local variables in the database?

If that feature doesn't exist in the visual editor any more can you please provide the code we could use for that instead?

The goal is to pass a variable from one page to the next just like in the tutorial above without having to store it in the database.

Thank you for your help!
Tobias


Where did the "set local storage variable" go?

Posted: Thu Oct 02, 2014 6:46 am
by Kateryna Grynko

Hi Tobias,

Please check our new doc: http://devcenter.appery.io/documentat...

You should add a variable with set storage to "local storage" and it will appear in dropdown.


Where did the "set local storage variable" go?

Posted: Thu Oct 02, 2014 8:07 am
by Tobias

Hi Kateryna,

Thank you very much. That solved the problem :-)

Can I ask another question along the same lines: can we take a value from a list on the page and pass it directly into a query if that service should return data e.g. in a pop-up? That means input variable (list item values) and output (pop-up) are on the same page.

It worked with the following set-up:

  1. add a single lable field out side the list and enter a value (in this case an order id number).

  2. go to data - before send - mapping - map the lable field to the empty query field.

  3. go to page - events - on clicking a list item invoke a serive to retrieve order data.
    Of course that meant for each list item the same results are returned.

    So far so good. Next step: parsing the value from the list items into the query instead of that one lable field and have the query return the data for each order id accordingly.

    I failed. The only thing i changed was the mapping (lable field in list item to query field vs. separate lable field to query field). See screenshot.

    Is there any way to make it work by directly linking list itmes on the page to a querry run to return data to the same page (e.g. pop-up) or do we have to use the local storage variable here as well?

    Thank you for your help
    Tobias

    Image


Where did the "set local storage variable" go?

Posted: Thu Oct 02, 2014 11:29 am
by Tobias

Hello,

I ended up doing it with local storage variable as well - that works nicely.

Cheers
Tobias


Where did the "set local storage variable" go?

Posted: Thu Oct 02, 2014 11:35 am
by Kateryna Grynko

Hi Tobias,

If you want to map an array of labels to service A, and these labels were created by service B, then I am not sure this is the best approach.

It is better to save needed values to a localStorage variable on service B Success event and then use it.


Where did the "set local storage variable" go?

Posted: Thu Oct 02, 2014 1:29 pm
by Tobias

Hi Kateryna,

will do. I understand local storage is limited to 5 MB so it clears old value automatically or would you advise to clear them regularly? If yes, how.

Thanks
Tobias


Where did the "set local storage variable" go?

Posted: Thu Oct 02, 2014 1:38 pm
by Kateryna Grynko

Hi Tobias,

Right, it is up to 5 MB. This is up to you, you can set clearing depending on your app logic.