Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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.
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?
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.
BI Consultant
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)
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.
BI Consultant
Thank You Miguel! That helps a lot!
BTW what are the typical uses of these APIs?
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.
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
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
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