Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
Not applicable

Container Tab Index

Hi

I have a container which contains two tab for two charts. I want to know which tab is the currently active tab like GetActiveTabe(). I dont wanna change anything in the container just want to get the index.

Since there is no trigger, is there a walk around?

Capture.PNG

1 Solution

Accepted Solutions
MVP
MVP

Re: Container Tab Index

AFAIK - only with a VBScript Macro like this:

Sub GetActiveTab
     Set ContainerObj = ActiveDocument.GetSheetObject("CT01")
     Set ContProp=ContainerObj.GetProperties
     ActiveObject=ContProp.SingleObjectActiveIndex
     MsgBox ActiveObject
End Sub

BTW: Macros are considered "evil" ...

View solution in original post

5 Replies
MVP & Luminary
MVP & Luminary

Re: Container Tab Index

The alternative is to use separate charts instead of a container and show/hide these charts as needed based one or more variables that are controlled by button clicks or a selection in a listbox. You can find an example here: Toggling multiple charts with variables and conditional show


talk is cheap, supply exceeds demand
MVP
MVP

Re: Container Tab Index

AFAIK - only with a VBScript Macro like this:

Sub GetActiveTab
     Set ContainerObj = ActiveDocument.GetSheetObject("CT01")
     Set ContProp=ContainerObj.GetProperties
     ActiveObject=ContProp.SingleObjectActiveIndex
     MsgBox ActiveObject
End Sub

BTW: Macros are considered "evil" ...

View solution in original post

Not applicable

Re: Container Tab Index

Why MsgBox?  )
Thanks anyways

MVP
MVP

Re: Container Tab Index

It should have been removed of course (the MsgBox) ... only tor testing ...

Support
Support

Re: Container Tab Index

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