Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
gandalfgray
Valued Contributor

Function to get Object ID?

Is there a function to get the Object ID of the currently active object?

4 Replies

Function to get Object ID?

Hi,

    Try this Code.

   

set s=ActiveDocument.ActiveSheet

for i=0 to s.NoOfSheetObjects-1

    if s.SheetObjects(i).IsActive then

     id = s.SheetObjects(i).GetObjectId

     msgbox("ID = " & id)

End if    

next

Regards,

Kaushik Solanki

chauhans85
Esteemed Contributor

Re: Function to get Object ID?

please see the attached file

gandalfgray
Valued Contributor

Re: Function to get Object ID?

Thanks for your suggestions, but it's not possible (as far as I know) to use macro code in for instance the Show Condition statement for an object (a Chart, a Listbox etc), and thats where I would like to use such a function, to be able to write a generic Show Condition statement.

tanelry
Contributor II

Re: Function to get Object ID?

You can use Sheet Properties > Triggers > Sheet Object Event Triggers (OnActivate, OnDeactivate) to set variables.

Then use those variables in Show Condition.

Community Browser