<?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: Re-opening an object after closing it in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Re-opening-an-object-after-closing-it/m-p/40470#M619</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 try the &lt;A href="https://help.qlik.com/en-US/sense-developer/April2018/Subsystems/APIs/Content/CapabilityAPIs/VisualizationAPI/VisualizationAPI.htm"&gt;visualization API&lt;/A&gt; instead. You do something like this:&lt;/P&gt;&lt;P&gt;app.visualization.get('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;WJYuPN').then(function(vis){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vis.show('QV01');&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The visualization you get back has a &lt;A href="https://help.qlik.com/en-US/sense-developer/April2018/Subsystems/APIs/Content/CapabilityAPIs/VisualizationAPI/close-method.htm"&gt;close()&lt;/A&gt; method, which might be what you need. (never mind the code example in the doc, you will find the close() method on the object you get back from app.visualization.get promise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possible solution is to not close objects. I don'ät think the built-in client closes objects, so it might work anyhow.&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, 21 Jun 2018 15:19:23 GMT</pubDate>
    <dc:creator>ErikWetterberg</dc:creator>
    <dc:date>2018-06-21T15:19:23Z</dc:date>
    <item>
      <title>Re-opening an object after closing it</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Re-opening-an-object-after-closing-it/m-p/40468#M617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently making a one page website that contains a lot of Qlik Sense Objects. The problem with my one page website is that all the objects are present at the same time and they aren't limited to the objects you can see (like in a normal Qlik Sense dashboard). All these objects cause a lot of performance issues because every selection influences all the objects at the same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To solve this problem, I have come up with a number of solutions:&lt;BR /&gt;1) Only enable the Qlik Sense Objects that the user can see. I was hoping there was maybe an option like &lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px; background-color: #f4f4f4;"&gt;noInteraction&lt;/SPAN&gt; or &lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px; background-color: #f4f4f4;"&gt;noSelections&lt;/SPAN&gt; that does include the object, but makes it ignore any other selection for the time being. Unfortunately, an option like this isn't available and as far as I can tell there is no other way to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Insert and remove the Qlik Sense Objects based on the scroll position. This way wherever the user goes he can see and use the Qlik Sense Objects and at the same time they aren't all calculating in the background (because they get removed if you aren't at the right scroll position). To test if this would work I made a very simple testcase (where I ignore the scroll position for now):&lt;BR /&gt;- When button A has been pressed -&amp;gt; Load objects 1-4 and remove objects 5-8;&lt;/P&gt;&lt;P&gt;- When button B has been pressed -&amp;gt; Load objects 5-8 and remove objects 1-4;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The code to achieve this (my one page website is split up in multiple pages):&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;$("a[href$='#page1']").click(function(){&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('QV01','WJYuPN');&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('QV02','JcJvj');&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('QV03','qamd');&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('QV04','nPLRub');&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt; app.getObject('QV05','bsxkrg').then(function(model) {&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;model.close();&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;});&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('QV06','vCNaSe').then(function(model) {&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;model.close();&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;});&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('QV07','RfEbJ').then(function(model) {&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;model.close();&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;});&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('QV08','MRmuW').then(function(model) {&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;model.close();&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;});&lt;/P&gt;
&lt;P&gt;});&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;$("a[href$='#page2']").click(function(){&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('QV05','bsxkrg');&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('QV06','vCNaSe');&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('QV07','RfEbJ');&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('QV08','MRmuW');&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt; app.getObject('&lt;SPAN style="font-size: 13.3333px;"&gt;QV01&lt;/SPAN&gt;','&lt;SPAN style="font-size: 13.3333px;"&gt;WJYuPN&lt;/SPAN&gt;').then(function(model) {&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;model.close();&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;});&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('&lt;SPAN style="font-size: 13.3333px;"&gt;QV02&lt;/SPAN&gt;','&lt;SPAN style="font-size: 13.3333px;"&gt;JcJvj&lt;/SPAN&gt;').then(function(model) {&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;model.close();&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;});&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('&lt;SPAN style="font-size: 13.3333px;"&gt;QV03&lt;/SPAN&gt;','&lt;SPAN style="font-size: 13.3333px;"&gt;qamd&lt;/SPAN&gt;').then(function(model) {&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;model.close();&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;});&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;app.getObject('&lt;SPAN style="font-size: 13.3333px;"&gt;QV04&lt;/SPAN&gt;','&lt;SPAN style="font-size: 13.3333px;"&gt;nPLRub&lt;/SPAN&gt;').then(function(model) {&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;model.close();&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt; &lt;/SPAN&gt;});&lt;/P&gt;
&lt;P&gt;});&lt;/P&gt;


&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;The problem is, when I press button A and then button B (or the other way around), I don't see my objects anymore and I get the following error:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;require.js:19 TypeError: Cannot read property 'qType' of undefined&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Object.A.f.setLayout (qlik.js:107)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at a.c [as fn] (qlik.js:107)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at a.&amp;lt;anonymous&amp;gt; (qlik.js:37)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at g (require.js:20)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at require.js:20&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at o.$eval (require.js:20)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at o.$digest (require.js:20)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at o.$apply (require.js:20)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Object.$apply (require.js:38)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at qlik.js:37&lt;/P&gt;


&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;I think the problem lies in the usage of app.getObject in combination with model.close(). The problem is, I don't know how to solve this issue. I have tried using &lt;SPAN style="background-color: #f4f4f4; color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px;"&gt;destroySessionObject &lt;/SPAN&gt;, but this method doesn't work (and that's correct I think, because as far as I know &lt;SPAN style="background-color: #f4f4f4; color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 16px;"&gt;destroySessionObject&lt;/SPAN&gt; isn't the correct method to use here). I have also looked at the DestroyObject method, but I can't find any examples on how to use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;To conclude, my question is: how do I successfully re-open my Qlik Sense objects after closing them? &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;If there is a better way to solve my original problem I would also love to hear it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Casper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2018 10:01:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Re-opening-an-object-after-closing-it/m-p/40468#M617</guid>
      <dc:creator>cpomeren003</dc:creator>
      <dc:date>2018-06-18T10:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Re-opening an object after closing it</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Re-opening-an-object-after-closing-it/m-p/40469#M618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am also happy with ideas instead of solutions &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;. I have tried everything I could think of, so if any smart people here have some new ideas, please let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2018 14:47:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Re-opening-an-object-after-closing-it/m-p/40469#M618</guid>
      <dc:creator>cpomeren003</dc:creator>
      <dc:date>2018-06-21T14:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Re-opening an object after closing it</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Re-opening-an-object-after-closing-it/m-p/40470#M619</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 try the &lt;A href="https://help.qlik.com/en-US/sense-developer/April2018/Subsystems/APIs/Content/CapabilityAPIs/VisualizationAPI/VisualizationAPI.htm"&gt;visualization API&lt;/A&gt; instead. You do something like this:&lt;/P&gt;&lt;P&gt;app.visualization.get('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;WJYuPN').then(function(vis){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vis.show('QV01');&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The visualization you get back has a &lt;A href="https://help.qlik.com/en-US/sense-developer/April2018/Subsystems/APIs/Content/CapabilityAPIs/VisualizationAPI/close-method.htm"&gt;close()&lt;/A&gt; method, which might be what you need. (never mind the code example in the doc, you will find the close() method on the object you get back from app.visualization.get promise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possible solution is to not close objects. I don'ät think the built-in client closes objects, so it might work anyhow.&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, 21 Jun 2018 15:19:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Re-opening-an-object-after-closing-it/m-p/40470#M619</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2018-06-21T15:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re-opening an object after closing it</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Re-opening-an-object-after-closing-it/m-p/40471#M620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for my late response. I have tried using what you have suggested but I run into the same problem as before (I can't re-open them).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After thinking for a while and based on your answer I think I have found a different solution. Previously the idea was to keep the HTML unchanged and just don't load the qlik object through the JS. The new idea is to not close the object like you suggested and just changing the HTML to include the reference to the qlikobject based on the scrollposition. &lt;SPAN style="font-size: 10pt;"&gt;This way the qlik objects don't all load and don't cause any performance issues.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am currently working on making it work and when it's done i'll post the solution so other's can use it as well. Thanks for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Casper&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 07:22:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Re-opening-an-object-after-closing-it/m-p/40471#M620</guid>
      <dc:creator>cpomeren003</dc:creator>
      <dc:date>2018-06-27T07:22:34Z</dc:date>
    </item>
  </channel>
</rss>

