Page 3 of 3

How to select a value in a list and retrieve data in a new page based on that value?

Posted: Sat Nov 09, 2013 11:21 pm
by Marc6388140

My issue is still there.

Maybe it is not the best way to define the architecture of my App and I should have 24 pages with filters set manually? How do the other people achieve what I'm asking at the first post?


How to select a value in a list and retrieve data in a new page based on that value?

Posted: Sun Nov 10, 2013 9:21 am
by Marc6388140

Any idea? Thank You!


How to select a value in a list and retrieve data in a new page based on that value?

Posted: Sun Nov 10, 2013 9:49 am
by Igor
  • On "startScreen" remove mobilelistitem_44 click event;

    • On "startScreen" add localStorage variable like on screenshot

      Image

    • put next code to where clause:
      prereturn '{"COMARCA":"'+value+'"}';/pre


How to select a value in a list and retrieve data in a new page based on that value?

Posted: Sun Nov 10, 2013 9:59 am
by Marc6388140

Yes! It works now!!

Thank You!!


How to select a value in a list and retrieve data in a new page based on that value?

Posted: Sun Nov 10, 2013 5:50 pm
by Marc6388140

Now the problem I have is that if I set an event into another mobilelistitem with another text ("Alt Empordà"), when doing click the value stored stills being "Alt Camp" and not "Alt Empordà". How can I do it to "flush" or empty the locally stored data?

Image

Image


How to select a value in a list and retrieve data in a new page based on that value?

Posted: Sun Nov 10, 2013 6:41 pm
by maxkatz

You can set it to an empty string value. For instance:

localStorage.setItem("key", "");

You can also remove the item:
localStorage.removeItem("key);


How to select a value in a list and retrieve data in a new page based on that value?

Posted: Sun Nov 10, 2013 7:35 pm
by Marc6388140

It works now.

For some reason the element was storing a wrong value (the same as the first element). So, I just deleted the second list element and created it again.

Thank You,

Marc