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: 
amitarusi
Contributor III
Contributor III

Replacing Specific User Bookmark ID

Hello,

I Have a Purchase model that contains a lot of Purchase orders, i want every user to have on the dashboard a list of their favorite Purchase documents.

I created a trigger that's creates Server User bookmark with a specific name so that i will be able to refer it in an expression and create a table with and expression like this -  Sum({$*bookmark_name} money).

But after the first time the user creates the bookmark i need to change the trigger to replace bookmark because if i'll create a multiple bookmarks with the same name the expression will refer to the first one created.

The problem is that the input on Replace bookmark trigger is the bookmark id, and the bookmark id is something i didn't manage to control when created on "open in server".

1 Reply
marcus_sommer

Maybe you need a few adjustments to your logic then you could set, change and remove bookmarks by ID - the following examples are from the APIGuide.qvw which you could find in your install-folder.

ActiveDocument.RemoveBookmarkById "BM01"

ActiveDocument.SetDocBookmarkId "BM01","MyBookmarkId"

Class MemberType Member ParameterNo ParameterTypeDirectionComment
DocumentMethodCreateDocBookmarkreturn value- No return value
1AdditiveBooleanintrue if bookmark to be applied on top of current selections
2NameStringinName of bookmark
3IdStringin, optionalBookmark ID
4Typeshortin, optional0 = Normal 1 = Shared 2 = Temporary
5ExcludeSelectionsBooleanin, optional 
6LayoutStateBooleanin, optional 
7HideBooleanin, optional 
8ShowPopupInfoBooleanin, optional 
9InfoMsgStringin, optional 
10InputFieldValuesFlagBooleanin, optional

- Marcus