I achieved this as follows:
Step 1: Create the document bookmarks in the normal manner.
Step 2: Open the bookmarks dialog (Bookmarks | More) to get the bookmark Ids for each bookmark. Then uncheck the checkboxes in the “+” column.
Step 3: Create an inline table in the load script with the bookmark names and IDs – something like this:
LOAD * INLINE
[
BMName, BMId
Stock on hand, BM32
Reclaim pending, BM30
Legal hold, BM26
Write offs, BM33
Phyical stock, BM29
Saleable stock, BM31
];
Step 4: Create a list box containing BMName, and arrange horizontally. You can also sort the list box by load order, if appropriate.
Step 5: Add the BMName selection to each bookmark, by selecting the bookmark (from a bookmark control, or the menu. Then select the corresponding BMName value. Finally, click Bookmarks | Replace bookmark to update the bookmark with the BMName selection. I used an open Current Selections box to verify the correct behaviour.
Step 6: (Almost there!) Go to Settings | Document Properties | Triggers and add an On Select trigger on the field BMName. Add a Clear All action, followed by an Apply Bookmark action. For the Bookmark ID for the latter, enter “=BMId” (without the quotes!).
That’s it. Now selecting a value in the “selector bar” for the bookmarks will apply the bookmark and show the currently applied bookmark. Clicking the selected value will clear the bookmark (ie normal list box behaviour).
If you find this useful, or would have any comments on this technique, please post a comment.
Thanks for the great idea Jonathan. Can't wait to give it a try in a project.
ReplyDeleteJust gr8. Thanks
ReplyDeleteMore than 2 years old post.. But still its very useful..
ReplyDeleteThanks
Hi Jo , yes this is very good appraoch. recently i use this appraoch ( in line load ) for my dimension selection. and i can use in every Sheet and when i change the in line load text , all page changes. very productive. ( compare to the old approach i write script on list box , which is not good), thank you for sharing use this for book mark.
ReplyDeletehttp://community.qlikview.com/thread/100867
ReplyDeleteHi jonathan
I try to do what you mentioned . but i am not able to get it right. above link is my post to forum, hope you can advise me. Thank.
Excellent idea, thanks for the post!
ReplyDeleteGreat idea - simple and effective
ReplyDeletecan i use this appraoch for user bookmarks??
ReplyDeleteAny similar feature to get IDs/Apply bookmarks for User/Server Bookmarks?
ReplyDeleteCan we don in Action of a Button or any Macro?
Thanks Jonathan
ReplyDelete