Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Basic Question on Bookmark

Hello,

I have a very basic requirement of dislaying bookmark name in a text box (if there is an active book mark selection).

Is there any out of box variable/function can be used to display this? or is there any way to achive this?

Thanks,

Aji Paul.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Aji

If you use my approach, then the report title could be dynamic, like this:

=GetFieldSelections(BMName)

(assuming only one bookmark name selected)

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

12 Replies
Not applicable
Author

Hi this is a macro to pick tha name (copied from ApiGuide.qvw):

set bm = ActiveDocument.GetBookmark("BM01")

if bm.Default = true then

    msgbox(bm.Bookmark.Name)

else

    msgbox("Bookmark does not exist")

end if

But You have to get a target bookmark...

Try to search in ApiGuide.qvw if there is a way to discover the bookmark selected...

C u,

Stefano.

Not applicable
Author

Stefano,

Thanks for the direction.

I never used any API with QV(just getting hands around QV).

BTW where do I try this code. As textbox properties?

Miguel_Angel_Baeyens

Hi,

There is a Module editor in QlikView in addition to the Script editor that you already know. Go to Control + M to use the QlikView API and VBScript or JScript code according to the APIGuide.qvw file syntax. This file is located in the Documentation folder if you do the complete instalation.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Thanks Miguel!

Pardon my unawareness! What are some practical application of  APIs?

Can APIs be used in the following scenario? When a book mark is selected,navigate to a specific sheet.

(I am still waiting for the approval of QV training from my employer)

Miguel_Angel_Baeyens

Hi Aji,

No problem, this is what the QlikCommunity is for.

In regards to your particular question, there is no need for a macro. When you create a bookmark, make sure you click "Include Layout State" and you will get to the same point of selections, scroll in charts and same sheet where you created it. So first of all, go to the sheet you want to be moved, and there create the bookmark.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Thank You Miguel! That helps a lot!

BTW what are the typical uses of these APIs?

jonathandienst
Partner - Champion III
Partner - Champion III

Aji

I have a fully documented process for displaying the active bookmark from a set of bookmark at my blog. This is how it displays (its a list box). This process does not require macro code, only a little setup and a couple of actions.

visual BM.png


Have a look at the blog article here.

I would be happy to answer any questions you may have if you get stuck.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks Jonathan! Very interesting!

My plan was creating few bookmarks on a sheet, then excutive can select the bookmark and it will update a text box with the bookmark name. So it will serve as a report title

jonathandienst
Partner - Champion III
Partner - Champion III

Aji

If you use my approach, then the report title could be dynamic, like this:

=GetFieldSelections(BMName)

(assuming only one bookmark name selected)

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein