Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

sri_c003
Contributor

Qlik Bookmark API via WS

Opened app:

app = qlik.openApp('4a6bc5c5-bff4-48a9-b8dc-a2ed55b7b612', config);

App has a few fields and 4 bookmarks.

app.getList("FieldList", function(reply){

      var field_str = "no fields found!";

      if (reply.qFieldList != null) {

          field_str = '';

          $.each(reply.qFieldList.qItems, function(key, value) {

              field_str +=  value.qName + ' ';

          });

      }

      console.log('FieldList --> ' + field_str);

  });

Fields being displayed correctly.

Did the same for bookmarks.

  app.getList("BookmarkList", function(reply){

      var bookmark_str = "no bookmarks found!";

      if (reply.qFieldList != null) {

          bookmark_str = '';

          $.each(reply.qFieldList.qItems, function(key, value) {

              bookmark_str +=  value.qName + ' ';

          });

      }

But bookmarks are coming up as empty.

Could anyone help me with this.

Also, how do i save the bookmark including selections made the sheet.

2 Replies
erik_wetterberg
Valued Contributor III

Re: Qlik Bookmark API via WS

Hi,

You do not get a qFieldList when you fetch a bookmarklist but a qBookmarkList. Try that instead. You could also simply log the reply to the console and inspect it, or set a breakpoint.

Erik Wetterberg

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

Re: Qlik Bookmark API via WS

Thank you Eric. This worked for listing bookmarks.

Could you also point me to where I could save my bookmark with sheet selections, please.

I am using the below, but this does not give any option for such details.

app.bookmark.create('Test bookmark via JS - 1','Test bookmark via JS - 1 - using ids for both app and sheet names','662202cd-c708-494a-9690-3508d4f39fdb');