<?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 exportData not working for a native object inside of an extension in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/exportData-not-working-for-a-native-object-inside-of-an/m-p/1312572#M7343</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have developed an extension which takes Object IDs of existing native Qlik Sense visualizations and renders them within different types of containers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I would like to make it possible to export the data of the Qlik Sense visualizations, so I have started playing around with the exportData property, as described in &lt;A href="http://help.qlik.com/en-US/sense-developer/3.2/Subsystems/APIs/Content/ExtensionAPI/exportdata-property.htm" title="http://help.qlik.com/en-US/sense-developer/3.2/Subsystems/APIs/Content/ExtensionAPI/exportdata-property.htm"&gt;exportData property ‒ Qlik Sense&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first think I noticed when doing so was that the layout.qHyperCube object was empty because it refers to the extension object, which takes no hypercube. So what I did was to overcome this issue was to copy the qHyperCube of the object I want to export into the layout object of the extension using the following piece of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14931134838115184" jivemacro_uid="_14931134838115184" modifiedtitle="true"&gt;
&lt;P&gt;qlik.currApp().getObjectProperties(qvid).then(function(result){&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; layout.qHyperCube = result.layout.qHyperCube;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result.getHyperCubeData('/qHyperCubeDef', [{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qTop: 0,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qLeft: 0,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qWidth: 10,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qHeight: 1000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }]).then(function(data){&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layout.qHyperCube.qDataPages = data.qDataPages;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;
&lt;P&gt;});&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to work because when exportData function is called, the layout contains the qDataPages as I need them. In spite of this, I am getting the following error message:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Export failed. There is no data to export. Please make sure the data in your visualization is correct.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have tried other alternative approaches such as modifying the qHyperCube of the layout of the extension using the backendAPI instead of copying directly the information in the frontend but even then I get the same error. What am I missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Apr 2017 09:52:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-04-25T09:52:25Z</dc:date>
    <item>
      <title>exportData not working for a native object inside of an extension</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/exportData-not-working-for-a-native-object-inside-of-an/m-p/1312572#M7343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have developed an extension which takes Object IDs of existing native Qlik Sense visualizations and renders them within different types of containers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I would like to make it possible to export the data of the Qlik Sense visualizations, so I have started playing around with the exportData property, as described in &lt;A href="http://help.qlik.com/en-US/sense-developer/3.2/Subsystems/APIs/Content/ExtensionAPI/exportdata-property.htm" title="http://help.qlik.com/en-US/sense-developer/3.2/Subsystems/APIs/Content/ExtensionAPI/exportdata-property.htm"&gt;exportData property ‒ Qlik Sense&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first think I noticed when doing so was that the layout.qHyperCube object was empty because it refers to the extension object, which takes no hypercube. So what I did was to overcome this issue was to copy the qHyperCube of the object I want to export into the layout object of the extension using the following piece of code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14931134838115184" jivemacro_uid="_14931134838115184" modifiedtitle="true"&gt;
&lt;P&gt;qlik.currApp().getObjectProperties(qvid).then(function(result){&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; layout.qHyperCube = result.layout.qHyperCube;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result.getHyperCubeData('/qHyperCubeDef', [{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qTop: 0,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qLeft: 0,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qWidth: 10,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qHeight: 1000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }]).then(function(data){&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layout.qHyperCube.qDataPages = data.qDataPages;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;
&lt;P&gt;});&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to work because when exportData function is called, the layout contains the qDataPages as I need them. In spite of this, I am getting the following error message:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Export failed. There is no data to export. Please make sure the data in your visualization is correct.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have tried other alternative approaches such as modifying the qHyperCube of the layout of the extension using the backendAPI instead of copying directly the information in the frontend but even then I get the same error. What am I missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 09:52:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/exportData-not-working-for-a-native-object-inside-of-an/m-p/1312572#M7343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-25T09:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: exportData not working for a native object inside of an extension</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/exportData-not-working-for-a-native-object-inside-of-an/m-p/1827188#M15377</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you found any solution for that problem?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am facing the same issue.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 17:26:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/exportData-not-working-for-a-native-object-inside-of-an/m-p/1827188#M15377</guid>
      <dc:creator>hiancintra</dc:creator>
      <dc:date>2021-08-06T17:26:11Z</dc:date>
    </item>
  </channel>
</rss>

