<?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 Export to csv only selected object from within container object in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Export-to-csv-only-selected-object-from-within-container-object/m-p/2101957#M18949</link>
    <description>&lt;P&gt;Greetings everyone,&lt;BR /&gt;I have a container object that has 3 tables inside, am trying to export only the selected table to csv, however currently its exporting all the object under the container which is the 3 tables, I know the reason for that is because its inside a for loop on the objects of the container, however my question is how can I get only the active object from inside the container?&lt;BR /&gt;I found another post mentioning "&lt;SPAN&gt;app.getFullPropertyTree&lt;/SPAN&gt;" however am not sure how to use it.&lt;BR /&gt;Is there a way to tell which object is currently selected inside the container, then passign that objectID to the export csv funtion?&lt;BR /&gt;&lt;BR /&gt;my current code:&lt;BR /&gt;app.visualization.get('TjAb').then(async function (vis) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; vis.show("QV01");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; visList.push(vis);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; const mainId = vis.id;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; const containerLayout = await vis.model.getLayout();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; const childObjects = Object.values(containerLayout.qChildList);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for (const child of childObjects) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (const item of child)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const objectexport = await app.visualization.get(item.qInfo.qId);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;attachExportEvent(mainId, objectexport, item.qInfo.qId);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;function attachExportEvent(mainId ,object, objectId) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;$(`#buttonID`+ mainId).click(async function () {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;activeObject = object;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log("exporting object " + activeObject);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (activeObject) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; activeObject.exportData({ format: 'CSV_C', state: 'A' }).then(function (link) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; window.open(link);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Aug 2023 08:34:43 GMT</pubDate>
    <dc:creator>Shadi_Sai</dc:creator>
    <dc:date>2023-08-03T08:34:43Z</dc:date>
    <item>
      <title>Export to csv only selected object from within container object</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Export-to-csv-only-selected-object-from-within-container-object/m-p/2101957#M18949</link>
      <description>&lt;P&gt;Greetings everyone,&lt;BR /&gt;I have a container object that has 3 tables inside, am trying to export only the selected table to csv, however currently its exporting all the object under the container which is the 3 tables, I know the reason for that is because its inside a for loop on the objects of the container, however my question is how can I get only the active object from inside the container?&lt;BR /&gt;I found another post mentioning "&lt;SPAN&gt;app.getFullPropertyTree&lt;/SPAN&gt;" however am not sure how to use it.&lt;BR /&gt;Is there a way to tell which object is currently selected inside the container, then passign that objectID to the export csv funtion?&lt;BR /&gt;&lt;BR /&gt;my current code:&lt;BR /&gt;app.visualization.get('TjAb').then(async function (vis) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; vis.show("QV01");&lt;BR /&gt;&amp;nbsp; &amp;nbsp; visList.push(vis);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; const mainId = vis.id;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; const containerLayout = await vis.model.getLayout();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; const childObjects = Object.values(containerLayout.qChildList);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for (const child of childObjects) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (const item of child)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;const objectexport = await app.visualization.get(item.qInfo.qId);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;attachExportEvent(mainId, objectexport, item.qInfo.qId);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;function attachExportEvent(mainId ,object, objectId) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;$(`#buttonID`+ mainId).click(async function () {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;activeObject = object;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console.log("exporting object " + activeObject);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (activeObject) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; activeObject.exportData({ format: 'CSV_C', state: 'A' }).then(function (link) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; window.open(link);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 08:34:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Export-to-csv-only-selected-object-from-within-container-object/m-p/2101957#M18949</guid>
      <dc:creator>Shadi_Sai</dc:creator>
      <dc:date>2023-08-03T08:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Export to csv only selected object from within container object</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Export-to-csv-only-selected-object-from-within-container-object/m-p/2103476#M18974</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/185574"&gt;@Shadi_Sai&lt;/a&gt;&lt;/SPAN&gt; , in the containerLayout constant you have all the information that you need. If you look you have a props called activeTab where you have an ID. This ID is also defined under qChildList --&amp;gt; qItems array. There you will find all your container visualizations and then one with the ID present in activeTab is the active one.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 11:12:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Export-to-csv-only-selected-object-from-within-container-object/m-p/2103476#M18974</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2023-08-08T11:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Export to csv only selected object from within container object</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Export-to-csv-only-selected-object-from-within-container-object/m-p/2105391#M18991</link>
      <description>&lt;P&gt;Thank You&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145804"&gt;@alex_colombo&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;I didn't notice the activeTab props before, I have updated the code using it and now its working good.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 06:25:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Export-to-csv-only-selected-object-from-within-container-object/m-p/2105391#M18991</guid>
      <dc:creator>Shadi_Sai</dc:creator>
      <dc:date>2023-08-14T06:25:27Z</dc:date>
    </item>
  </channel>
</rss>

