Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 1 | Header 2 | Header 3 |
---|---|---|
Icon | Jane Smith | 500 |
Icon | Steve Jones | 750 |
Icon | Mike Lee | 1000 |
If I click on the 2nd icon, the new tab should show me information for Steve Jones.
Thanks for your help
Frank
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
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
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.
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
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