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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
mdbender
Contributor II
Contributor II

Apply bookmark in mashup fails

Hi community!

I'm working on custom mashup witch contains several html-pages in menu. I need to save user selections when he goes to another html page, so I make bookmark:

$(document).ready(function() {

  var config = {

  host: window.location.hostname,

  prefix: "/",

  port: window.location.port,

  isSecure: true

  };

$('.menu a').on('click', function () {

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

   var app = qlik.openApp('43a08992-ba42-408e-86d1-f1bc4700fdeb', config);

   app.bookmark.create('Test','Test bookmark','fMcJkH');

  });

  })

)}

This code create bookmark, so i can see in application.

When user  open selected html page the bookmark must apply and deleted as garbage.

var config = {

  host: window.location.hostname,

  prefix: "/",

  port: window.location.port,

  isSecure: true

  };

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

  var app = qlik.openApp('43a08992-ba42-408e-86d1-f1bc4700fdeb', config);

  app.bookmark.apply('fMcJkH');

  app.bookmark.remove('fMcJkH');

  });

But nothing happens. What I'am doing wrong?

Methods I take from https://help.qlik.com/en-US/sense-developer/September2017/Subsystems/APIs/Content/CapabilityAPIs/qli...

1 Reply
ErikWetterberg
Master
Master

Hi,

You might try waiting for bookmark apply before removing the bookmark:

app.bookmark.apply('fMcJkH').then(function(){

  app.bookmark.remove('fMcJkH');

});

If that does not help, check what happens on the web socket.

Erik Wetterberg