Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
brijeshvma
Partner - Creator
Partner - Creator

Export data on IIS Host Server

<button id="cmdExport" style="display:none;"> 

   Export data 

</button> 

<div id="QV01" style="position: absolute; top: 50px; left: 20px; width: 200px; height: 200px;" class="qvobject"></div>

Javascript;

require( ["js/qlik", "jquery"], function ( qlik, $ ) { 

   qlik.setOnError( function ( error ) { 

      alert( error.message ); 

   } ); 

 

  var app = qlik.openApp('1390eb6a-de5a-484e-ba75-a07b7a6239fd', config); 

 

  app.getObject('QV01','NaKQwM').then( function( vizModel ) { 

 

      // Prevent clicking on the button too early 

      $('#cmdExport').show(); 

 

 

      $('#cmdExport').on('click', function() { 

 

         vizModel.exportData().then(function( reply ) { 

            console.log('qUrl', reply); 

            window.open(reply.result.qUrl); 

         }); 

      }) 

   }); 

} ); 

When this call is completed from within qliksense Mashup hub, this works because the download is sent to the

tempcontent/{asbasdfasdf} folder of the root domain.

if your qliksense domain is

qlikabc.com/hub

your mashup can be

qlikabc.com/mashup/test

the export file will always be

qlikabc.com/tempcontent/{asdsadfsadf}

But we don't use qliksense mashup HUB.

our site would be

mysite.com/

we use an external IIS to host our mashup.  So calling table.exportData does not work because the URL is incorrect.

It tries to download the url at

mysite.com/tempcontent/{abcasdfasdf}

which doesn't exist.

I thought that the exportData returns a promise so i added the then, unfortunately nothing is returned so I am not able to correct the location of the file, which I realized is stored on the qliksense server.  Is there a flag or anything that is available to figure out what is the export tempcontent info so that I can use it to get the link to downloadable file.

1 Reply
brijeshvma
Partner - Creator
Partner - Creator
Author

Hi All,

Any Idea , How to resolve this