2 Replies Latest reply: Jan 4, 2018 2:36 AM by Erik Wetterberg RSS

    Saving current selections and applying them later

    Elia Dal Santo

      Hi, I'm new to the QlikSense API, and I'm confused about how to use the selections API: selectionState method ‒ Qlik Sense Developers


      Basically, I have built a mashup site where I included the Selections Bar at the top, so my users can apply selections to the objects on the page.


      What I need  is to SAVE the current selection state somewhere, so I can then later re-apply it at will.


      However, this is giving me trouble. I know I can obtain the current selection state by calling:


      var currentSel = app.selectionState();


      however, this object cannot be serialized to string (due to circular dependencies) and even if I could serialize it, I can't find a method to APPLY it to the app later on.


      How can I achieve this?