Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
fcecconi
Partner - Creator III
Partner - Creator III

Switching Tabs

I would like to be able to go to a different tab by clicking on an icon in a straight table.  I also need to filter the data by a key on that row.  I am able to load the icon into the straight table, but how do I associate a key with the icon.

Header 1Header 2Header 3
IconJane Smith500
IconSteve Jones750
IconMike Lee1000

If I click on the 2nd icon, the new tab should show me information for Steve Jones.

Thanks for your help

Frank

1 Solution

Accepted Solutions
fcecconi
Partner - Creator III
Partner - Creator III
Author

Elena

What I did was I added an icon (duplicate of the name object) to the table.  I then added an action on when the icon was selected to run a macro.  here is what my macro looked like

if vCurrSheet = "Document\SHResults" or vCurrSheet = "Document\SHCA" then

        

  set vContributor = ActiveDocument.Fields("Name").GetPossibleValues

  rem msgbox("Author "&vAuthor.Count)

        if vContributor.Count = "1" then

        

            ActiveDocument.Fields("Name").SelectPossible

            ActiveDocument.Fields("IMAGE").Clear

        ActiveDocument.ActivateSheet "SHCP"

  End If

  End If

View solution in original post

4 Replies
Anonymous
Not applicable

Hello,

The column with icons is an expression? If so you can go to document properties>triggers>Field event Trigger and add an OnSelect event for your field Header2 (the one with names). The event will be Layout>Activate sheet and you have to set the tab ID where you want to go.

In this new sheet, values will be coeherent with your selection.

Hope it can be usefull!

Elena

fcecconi
Partner - Creator III
Partner - Creator III
Author

Elena

I was able to get the same type of navigation, but I would also like to use all the other fields as filters.  Do you know if this can be done?  In my example, clicking on any other field does filter, but it also activates the other tab.  I only want the tab to be activiated if the icon is selected.

Anonymous
Not applicable

Ok!

I found the following solution.

When you select a value of an expression, as you know, QV makes selections for all fileds connected to that row.

So you can use a variable like the following where you must insert all dimensions in your table (for example 2):

Variable1:  =if(GetSelectedCount(FirstDim)=1 and GetSelectedCount(SecondDim)=1, 'yes', 'no')

Then in doc properties>Trigger>Variable event trigger> for Variable1 you can add the OnChange event Layout>activate sheet.

Make some tests and let me know.

Elena

fcecconi
Partner - Creator III
Partner - Creator III
Author

Elena

What I did was I added an icon (duplicate of the name object) to the table.  I then added an action on when the icon was selected to run a macro.  here is what my macro looked like

if vCurrSheet = "Document\SHResults" or vCurrSheet = "Document\SHCA" then

        

  set vContributor = ActiveDocument.Fields("Name").GetPossibleValues

  rem msgbox("Author "&vAuthor.Count)

        if vContributor.Count = "1" then

        

            ActiveDocument.Fields("Name").SelectPossible

            ActiveDocument.Fields("IMAGE").Clear

        ActiveDocument.ActivateSheet "SHCP"

  End If

  End If