Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Embed qlick sense object in web/mobile

Hi, I'm trying to embed qlick sense object in hybrid app using below code.

var config = {   

      host: window.url,   

     isSecure: true

};

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

     // open the app   

var app = qlik.openApp("61af269d-5b22-4d8c-afa5-8dda1624c577", config);   

     // insert Qlik objects into the page.   

     app.getObject(document.getElementById("qlikContent"), "objectID");

});

But I'm getting "Cannot read property 'openApp' of undefined" error:

error:

VM1637 qlikReport.js:22 Uncaught TypeError: Cannot read property 'openApp' of undefined at VM1637 qlikReport.js:22

Can anyone please let me know what i'm missing here.

Thanks.

6 Replies
bekahbeets
Creator
Creator

I am having this issue as well. Were you able to fix it?

ErikWetterberg

Hi,

Have you got qlike requirejs (which inludes a lot more than requirejs) included?? Do you configure requirejs baseUrl? You probably need to have the prefix set in your config, just a slash if you do not use virtual prox.

Erik Wetterberg

bekahbeets
Creator
Creator

Theres 2 kinds of requirejs??? Where do i get the one for qlik?

I don't understand what the prefix is... I thought it was just what comes after the port number in a uri?

ErikWetterberg

Hi,

In your mashup you need to include a file called require.js that includes not only the requirejs library, but also some other libraries and qlik modules you need. Normally this is made in the html file, something like this:

<script src="../../resources/assets/external/requirejs/require.js"></script>

The prefix in this context is the virtual proxy that is part of the URL. If you do not use a virtual proxy (like for example in desktop) you would set it to slash.

Erik Wetterberg

bekahbeets
Creator
Creator

that src points to a location on the local machine. I need the correct require.js file (with qlik stuff inside) to put in that local folder.

ErikWetterberg

You could also modify this link to point to your Sense installation. There is also a link to the css file you need to change.

Erik Wetterberg