<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Saving current selections and applying them later in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Saving-current-selections-and-applying-them-later/m-p/1458164#M9362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe look at saving the selection state to a Bookmark and when you need to apply the bookmark.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have never tried doing this so don't know the API calls off hand, but in theory I reckon it should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jan 2018 17:45:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-01-03T17:45:46Z</dc:date>
    <item>
      <title>Saving current selections and applying them later</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Saving-current-selections-and-applying-them-later/m-p/1458163#M9361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm new to the QlikSense API, and I'm confused about how to use the selections API: &lt;A href="http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/AppAPI/selectionState-method.htm" title="http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/AppAPI/selectionState-method.htm"&gt;selectionState method ‒ Qlik Sense Developers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need&amp;nbsp; is to SAVE the current selection state somewhere, so I can then later re-apply it at will.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this is giving me trouble. I know I can obtain the current selection state by calling:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var currentSel = app.selectionState();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I achieve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 17:10:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Saving-current-selections-and-applying-them-later/m-p/1458163#M9361</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2018-01-03T17:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Saving current selections and applying them later</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Saving-current-selections-and-applying-them-later/m-p/1458164#M9362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe look at saving the selection state to a Bookmark and when you need to apply the bookmark.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have never tried doing this so don't know the API calls off hand, but in theory I reckon it should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 17:45:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Saving-current-selections-and-applying-them-later/m-p/1458164#M9362</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-03T17:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Saving current selections and applying them later</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Saving-current-selections-and-applying-them-later/m-p/1458165#M9363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You could use app.bookmark.create:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/BookmarkAPI/create-bookmark-method.htm" title="http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/BookmarkAPI/create-bookmark-method.htm"&gt;create method ‒ Qlik Sense Developers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you would do is create a bookmark and save the id you get back (that is you get a promise back, when the promise resolves, you'll get the id. Save the id, and apply it later with app.bookmark.apply: &lt;A href="http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/BookmarkAPI/apply-bookmark-method.htm" title="http://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/BookmarkAPI/apply-bookmark-method.htm"&gt;apply method ‒ Qlik Sense Developers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use the selection state, in that case you would need to loop over all fields with selections, and save the selected values for all fields. When you recall the selection you would do it the other way around. This would be complicated in case there are many selections, using a bookmark is much easier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik Wetterberg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 06:28:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Saving-current-selections-and-applying-them-later/m-p/1458165#M9363</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2018-01-04T06:28:48Z</dc:date>
    </item>
  </channel>
</rss>

