<?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: Export data using API in mashup not working for container object in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Export-data-using-API-in-mashup-not-working-for-container-object/m-p/2001341#M17520</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/91927"&gt;@Qlik1_User1&lt;/a&gt;&amp;nbsp;, after you get the container object, you have to read which objects is containing. Then you have to perform a new getObject call pointing to the table you want to export. I usually use Engine APIs from Capability APis for doing this. Below an example:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//Wait Engine API promise
const promise = await app.model.waitForOpen.promise
//Get container object
const container = await app.model.enigmaModel.getObject('_yourContainerObjectId_');
//Get container layout for reading container children
const containerLayout = await container.getLayout();
//Get as an example the first children and then export its data (you should loop over children and do your stuff)
const chartOne = await app.model.enigmaModel.getObject(containerLayout.children[0].refId);
//Define export type as CSV
const exportDef = {
	"qFileType": "CSV_C",
	"qPath": "/qHyperCubeDef",
	"qExportState": 0,
	"qServeOnce": false
};
const exportData = await chartOne.exportData(exportDef);
//Print export url
console.log(exportData.qUrl)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Nov 2022 16:58:10 GMT</pubDate>
    <dc:creator>alex_colombo</dc:creator>
    <dc:date>2022-11-07T16:58:10Z</dc:date>
    <item>
      <title>Export data using API in mashup not working for container object</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Export-data-using-API-in-mashup-not-working-for-container-object/m-p/1962256#M17106</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;Need one help.&lt;/P&gt;
&lt;P&gt;Can we export data from container object {container object has 3 tables in it} using mashup API? Currently I am not able to do so for 3 tables with in a container .&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For a single objects below function is working like pie chart , single table or any chart that is not part of container object but not working for tables / or any other charts that are part of a container object.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Function used is&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;exportdatas('chart1','wdmg')&lt;/P&gt;
&lt;P&gt;//here wdmg is object id of container.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;function exportdatas(divid,objectid){&lt;BR /&gt;&lt;BR /&gt;app.getObject(divid,objectid).then(function(model){&lt;BR /&gt;&lt;BR /&gt;var d = app.table(model);&lt;BR /&gt;d.exportData({'format':'CSV_C','state':'A','filename': 'exportdata.csv','download': true})&lt;BR /&gt;&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;Please help on this.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jul 2022 08:36:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Export-data-using-API-in-mashup-not-working-for-container-object/m-p/1962256#M17106</guid>
      <dc:creator>Qlik1_User1</dc:creator>
      <dc:date>2022-07-31T08:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Export data using API in mashup not working for container object</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Export-data-using-API-in-mashup-not-working-for-container-object/m-p/2001341#M17520</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/91927"&gt;@Qlik1_User1&lt;/a&gt;&amp;nbsp;, after you get the container object, you have to read which objects is containing. Then you have to perform a new getObject call pointing to the table you want to export. I usually use Engine APIs from Capability APis for doing this. Below an example:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;//Wait Engine API promise
const promise = await app.model.waitForOpen.promise
//Get container object
const container = await app.model.enigmaModel.getObject('_yourContainerObjectId_');
//Get container layout for reading container children
const containerLayout = await container.getLayout();
//Get as an example the first children and then export its data (you should loop over children and do your stuff)
const chartOne = await app.model.enigmaModel.getObject(containerLayout.children[0].refId);
//Define export type as CSV
const exportDef = {
	"qFileType": "CSV_C",
	"qPath": "/qHyperCubeDef",
	"qExportState": 0,
	"qServeOnce": false
};
const exportData = await chartOne.exportData(exportDef);
//Print export url
console.log(exportData.qUrl)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 16:58:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Export-data-using-API-in-mashup-not-working-for-container-object/m-p/2001341#M17520</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2022-11-07T16:58:10Z</dc:date>
    </item>
  </channel>
</rss>

