Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
fenjas72
Contributor II
Contributor II

Cloning a bookmark from one app to another

Hi,

Is it possible to clone an existing bookmark from one app to another? I'm trying to do this using the Qlik Sense .NET SDK. I managed to get a bookmark using GetGenericBookmark() and re-create it using CreateBookmarkEx() within the same app but when doing so in another app, the bookmark though created lacks all the details i.e. no selections, set expressions, etc so pretty much useless. I'm pretty new to the api and Qlik Sense so I'm still trying to make heads or tails of it. 

I wrote a testing framework that uses bookmarks to return data that I wish to test mainly for data integrity purposes. Since we have multiple apps under different streams, it would be great if somehow we could clone the same bookmark across all apps.

If this is technically possible, I would really appreciate a working example in c#.

Thanks

 

 

 

 

Labels (1)
  • API

4 Replies
Ray_Strother
Support
Support

Hello ,

Here is a link that gives an option for cloning the app as what you are asking isn't possible.

https://community.qlik.com/t5/Official-Support-Articles/How-to-transfer-an-app-with-its-bookmarks-fr...

fenjas72
Contributor II
Contributor II
Author

Hi, unfortunately cloning the app is not an option. I'll see if I can create a bookmark from scratch.

I would have thought it would be possible to get the properties of an existing bookmark and then create a new bookmark object and assign to it the same properties.

Regardless, thanks for the help.

 

stefanstoichev123

Dealing with bookmarks is a "bit" of a pain.

 

Cloning a bookmark is not a simple process and there is no simple solution (as far as im aware). The main problem is the selections. When calling create bookmark method you can pass only the "metadata". Qlik will then get that metadata and create bookmark based on the current selections. And there is no way to pass the selections in the api.

 

The solution i have is to get the expression/set analysis that is in the bookmark metadata, "convert" it to field <-> value pairs (if any), get all the expressions used when the bookmark is created (if any) and after that apply the selections (one by one).

 

Once the selections are applied then you can create bookmark (by passing the metadata) and the new bookmark will technically be clone/copy of the existing bookmark.

 

Ive made an enigma.js mixin that should implement this workflow. Its JS code but can gives you an idea of the process

 

https://github.com/countnazgul/enigma-mixin/blob/68de1fb18f0718ff9a1f652348d8e14e9fd0cc6a/src/mixins...

 

Stefan

fenjas72
Contributor II
Contributor II
Author

Thanks man, will give it a try! Appreciated.