Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sravan_v007
Partner - Contributor III
Partner - Contributor III

Macro script for current selections..

Hi All,

I have a requirement, where I need to identify current selections i.e. Object Name, ObjectID and Selected Values.

So, I fount two different VBScripts. Please find below the 2 scripts.

Now I need your help to club both the scrips..

1. For identifying Object Name:


SUB Objects()

Shtobj = ActiveDocument.ActiveSheet.GetSheetObjects

for i = lBound(Shtobj) to uBound(Shtobj)

Obj = Shtobj(i).GetCaption.Name.v

ObjId = Shtobj(i).GetObjectId

if instr(Obj, "Month Name") then

msgbox Obj

msgbox ObjId

end if

next

END SUB


2. For identifying Selected Values:


sub theFieldValues ()

set myfield = ActiveDocument.Fields("Month Name").GetPossibleValues

for i=0 to myfield.count-1

K = myfield.Item(i).Text

msgbox K

next

end sub

Thanks in Advance.

H

Hi

4 Replies
marcus_sommer

Whats the aim behind this query? I fancy it could be reached without macros just with native qlikview features.

- Marcus

sravan_v007
Partner - Contributor III
Partner - Contributor III
Author

Hi Marcus..

Requirement: Users want a Button which will allow them to create link with current selections. which they can share with other users through a mail.

i.e. in simple words user want to create a Server Bookmark which they can share with others using mail link.

Issue: We can create User and Document bookmarks but we can't create Server bookmarks. So, I am trying to identify selections, store them in a variable and later in a link.

Something like below.

AJAX and URL parameters

prieper
Master II
Master II

Have you tried
"More" -> "Mail with Bookmark as a Link" within the webclient?

sravan_v007
Partner - Contributor III
Partner - Contributor III
Author

Hi Peter,

Thanks for Mail with Bookmark as a Link option.

But, Is it possible to put similar functionality as an Action button..

Thanks,

Hi