Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I am trying to make a mashup that allows users to create and use bookmarks. Unfortunately it doesn't work when I test it on Qlik Sense Desktop April 2019. The problem is that the bookmarks don't get saved and disappear when you refresh the page.
My code is based on the standard Grid mashup template:
This looks like this (I added the app consumer sales and an object):
In this mashup I do the following:
- Click "Bookmarks";
- Click "Create";
- Fill in a title and description -> click "Create";
This results in a bookmark called "This doesn't save":
Problem is, when I refresh the page I don't see my bookmark anymore:
I also checked the qBookmarkList where you normally find the bookmarks and they are empty:
qBookmarkList: {qItems: Array(0)}
The strange thing is, sometimes it does work and the bookmarks persist even when I refresh or restart my PC. Can anyone help me understand why this doesn't work (and sometimes does?)
Thanks in advance
Hi,
If you try creating two bookmarks with that code, is the first one saved?
The problem might be that you don't wait for the bookmark.create before saving. In that case try something like this:
app.bookmark.create( title, desc ).then(function(){
app.doSave();
});
But of course there might be another problem.
Hi,
In Qlik Sense Desktop you need to save the app, since that's where the bookmark is saved.
Hi Erik,
Thanks for the quick reply. I tried saving the app, but it doesn't work. I used it like this:
case 'createBm':
var title = $( "#bmtitle" ).val(), desc = $( "#bmdesc" ).val();
app.bookmark.create( title, desc );
$( '#createBmModal' ).modal( 'hide' );
//In Qlik Sense Desktop you need to save the app, since that's where the bookmark is saved.
app.doSave();
break;
It didn't do anything as far as I can see and I also don't get any errors in the console.
Hi,
If you try creating two bookmarks with that code, is the first one saved?
The problem might be that you don't wait for the bookmark.create before saving. In that case try something like this:
app.bookmark.create( title, desc ).then(function(){
app.doSave();
});
But of course there might be another problem.