Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Determine which column was clicked in OnSelect

I have some script that displays a chart when a selection is made in a different chart. Here's the columns in the first chart (a sales table):

UserID | Order ID | ProductID

So if a users clicks a UserID from the above chart, then another chart pops up showing some information about that UserID. Like this:

FirstName | LastName | Address | so on...

My issue is that I want a different chart to pop up if the user selects ProductID to show some information about that product.

So if i grab the chart:

c=ActiveDocument.GetSheetObject("CH575")

How can I tell that the user selected a UserID vs a ProductID. Or maybe this info is saved in a sheet object?


Thanks!

2 Replies
johnw
Champion III
Champion III

Maybe you could check for what is now selected, rather than what they clicked on.

getselectedcount(ProductID)

Not applicable
Author

Hi John,


That kind of works expect if there is already a UserID selected then a ProductID is selected. The you have both selected but I want to show the chart for whatever the user clicks last. I guess it really just goes against the way Qlikviews meant to be used.