Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to get id of active object

Hi!

I have button with macro and i need it visible only if object with id "CH01" is activate.

How to do it?

5 Replies
cspencer3
Creator II
Creator II

I would also have a use for this functionality. Any help would be great!

venkatg6759
Creator III
Creator III

find the attachment .Let me know if that helps

Anonymous
Not applicable
Author

cspencer3
Creator II
Creator II

Thanks for the thought but that is not quite what I need to do. I am familiar with showing and hiding objects based on field selections and use that quite a bit. However, what I am attempting to do now is show or hide a list box based on which object itself is selected. In my case i have a dynamic sort expression for a chart (the chart is in a container). Based on the selection in my "Sort" text box changes the sorting of the bar chart. If the chart is no longer the "Active Object" i want to hide the text box using show conditional statement. QlikView can already figure this information out because it uses the Active and Inactive caption functionality, but from what I am finding this does not have any availability for the developer.

Not applicable
Author

for chart in a container i use this way:

    dim ss

    set sheet = ActiveDocument.activesheet

    set ss = sheet.GetProperties

   

    select case ss.Name

        case "name_a"

            Set ContainerObj= ActiveDocument.GetSheetObject("CH01")

        case "name_b"

            Set ContainerObj= ActiveDocument.GetSheetObject("CH07")

  

    end select

   

   

Set ContProp=ContainerObj.GetProperties      

vActiveIndex=ContProp.SingleObjectActiveIndex

ActiveDocument.Variables("vActiveIndex").SetContent vActiveIndex, true