Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
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.

Tags (2)
6 Replies
bekahbeets2003
Contributor

Re: Embed qlick sense object in web/mobile

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

erik_wetterberg
Honored Contributor

Re: Embed qlick sense object in web/mobile

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

Erik Wetterberg
https://extendingqlik.upper88.com/
bekahbeets2003
Contributor

Re: Embed qlick sense object in web/mobile

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?

erik_wetterberg
Honored Contributor

Re: Embed qlick sense object in web/mobile

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

Erik Wetterberg
https://extendingqlik.upper88.com/
bekahbeets2003
Contributor

Re: Embed qlick sense object in web/mobile

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.

erik_wetterberg
Honored Contributor

Re: Embed qlick sense object in web/mobile

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

Erik Wetterberg
https://extendingqlik.upper88.com/
Community Browser