Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a tab with 3 containers on it. Each container contains two charts. I also have a couple of buttons. My requirement is that selecting a button (or re-opening the tab) causes a specific chart within each container to activate. I've tried using the Button Action: Activate Object for both the container object and the chart object but it is not working. I do also have an Apply Bookmark Action in my Button Properties Actions if that makes a difference.
Any suggestions?
Your help is greatly appreciated.
Thanks,
Cassandra
HI,
you have to use a macro for that purpose and then you can use buttons and actions to trigger the macro event:
Here the code snippet:
sub ResetContainerObject
ContTabSelect0("CT09")
ContTabSelect0("CT07")
ContTabSelect0("CT05")
end sub
sub ContTabSelect0(ObjectID)
set MV_ContainerObj = ActiveDocument.GetSheetObject(ObjectID)
Set MV_ContProp = MV_ContainerObj.GetProperties
MV_ActiveIndex2 = MV_ContProp.SingleObjectActiveIndex
MV_ActiveIndex2 = 0
MV_ContProp.SingleObjectActiveIndex = MV_ActiveIndex2
MV_ContainerObj.SetProperties MV_ContProp
End Sub
HI,
you have to use a macro for that purpose and then you can use buttons and actions to trigger the macro event:
Here the code snippet:
sub ResetContainerObject
ContTabSelect0("CT09")
ContTabSelect0("CT07")
ContTabSelect0("CT05")
end sub
sub ContTabSelect0(ObjectID)
set MV_ContainerObj = ActiveDocument.GetSheetObject(ObjectID)
Set MV_ContProp = MV_ContainerObj.GetProperties
MV_ActiveIndex2 = MV_ContProp.SingleObjectActiveIndex
MV_ActiveIndex2 = 0
MV_ContProp.SingleObjectActiveIndex = MV_ActiveIndex2
MV_ContainerObj.SetProperties MV_ContProp
End Sub
It looks like using Macros is usually not recommended according to Macro.
I don't suppose there are any other options?
This was an issue that I brought up to R&D a while ago. Those who are using certain versions QlikView will notice that these properties no longer produce the desired result. The API for getting the active object and changing the active object programmatically can be found in this article with examples: https://support.qlik.com/articles/000070090