Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Multipage Mashup - keep selections between html pages?

Hi!

We have received a nice mashup that contains of multiple .html-Pages. See here: http://demo.heldendaten.net:8080/extensions/Vertriebsdemo_Sense_Mashup/Produkte.html

Unfortunately, if a user does selections on one .html-Page (for example Produkt.html), these selections are lost when the user changes to another html page.

From what I see in the .js code, the Mashup always calls the following  code on every new page. See below.

--> to me it seems that calling openApp on every page, opens a new connection to the document --> old selections are lost.

--> I have read through the mashup API, but haven't really found anything to keep the app-session alive between multiple pages. I have played wit the "identity" property of the app config, but no success (running Qlik Sense 2.0.3)

--> has anyone a short example how I can fix the existing code?

var config = {
     host: window.location.hostname,
     prefix: "/",
     port: window.location.port,
     isSecure: window.location.protocol === "https:"
  //,
  //identity: "12349876"
};
require.config( {
     baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port: "") + config.prefix + "resources"
} );

require( ["js/qlik"], function ( qlik ) {
     qlik.setOnError( function ( error ) {
          alert( error.message );
     } );

     //callbacks -- inserted here --
  
     //open apps -- inserted here --
  
  
      app = qlik.openApp("871f98c2-38cd-46b1-9676-6dd3e87f06be", config);

     
  
     //get objects -- inserted here --
  
       $(".qvobject").each(function() {
          var qvid = $(this).data("qvid");
          app.getObject(this, qvid);
     });

28 Replies
Not applicable
Author

Thanks Aiham, then this is the way to go

Anonymous
Not applicable
Author

Hi Roland, have you solved this problem or found a walk-around?

I meet the same problem now. Selection can not be kept among different mashup pages.

I notice if I keep Qlik sense dev-hub open, the selection could be kept among different mashup pages.

I also notice if I open all the mashup pages, the selection could be kept among different mashup pages.

However, is there a technical solution to keep selection among different mashup pages?

Any suggestion is appreciated!

Anonymous
Not applicable
Author

Hi Aiham, I met the same problem in this thread.

I created multi pages mashup at Qlik sense server.

However, there are two big problems.

1): selection can NOT be kept among different mashup pages.

2): selections made by user A will affect the selection of user B. Actually user B will see the same what user A is selecting/doing on the mashup page.

Could you also please give any suggestion about how to create different sessions?

Any suggestion is appreciated!

Anonymous
Not applicable
Author

Hi Aiham, I have created a bookmark in the Javascript file of Qlik sense mashup with the following:

app.getObject('CurrentSelections','CurrentSelections');

app.bookmark.create('CurrentSelections','CurrentSelections');

However, selection still can not be kept during different mashup pages.

Any suggestion is appreciated!

Aiham_Azmeh
Employee
Employee

Hi Haikuo,

1) Selections are part of the current user session so each time the websockets is closed or re-created, you will get a new session; there are a couple of "workarounds" for you problem described here: Re: QS mashups and preserving selections

2) to isolate selections, you should be able to use "identity", see documentation here: openApp method ‒ Qlik Sense

I hope this helps,

regards

Anonymous
Not applicable
Author

Hi Roland,

I met the same problem as the following:

2): selections made by user A will affect the selection of user B. Actually user B will see the same what user A is selecting/doing on the mashup page.

How did you set the 'identity' at

var config = {

    host: "myhost.com",

    prefix: "/",

    port: window.location.port,

    isSecure: true

};

in your Vertriebsdemo_Sense_Mashup.js file.

Thanks so much for your suggestion and help!

Anonymous
Not applicable
Author

Hi Aiham ,

We created a Qlik sense mashup with Qlik sense desktop 3.0, and published it Qlik server 3.0.

The mashup will be public available. All users could Anonymous Login.

How to set in Qlik server, so the selection of User_A on mashup will NOT impact the selection of User_B on the same mashup page at the same page?

Thanks so much for your help!

Anonymous
Not applicable
Author

Hi Steven, I get some suggestion from Qlik. To save the cookie is the best method to keep selection among mashup pages.

My walk-around is to put multi page mashup into one HTML. However, it seems the page loading becomes slow.

moritzreinhard2
Partner - Contributor III
Partner - Contributor III

Just have a look at

https://smartbuilder.novofactum.de/

On this web portal you can build your own multipage Qlik Sense mashups with drag and drop. So you don‘ t need any knowledge in web programming to get an awesome mashup. Simply export your build mashup into a zip file and import it to Qlik Sense. It is for free and you can adjust the code afterwards as well. You only have to register to login.

Selections are kept if you go to another page.

Screenshot.png