Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sri_c003
Partner - Creator II
Partner - Creator II

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.

1 Solution

Accepted Solutions
ErikWetterberg

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

View solution in original post

2 Replies
ErikWetterberg

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

sri_c003
Partner - Creator II
Partner - Creator II
Author

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');