How to hide certain filters in Spotfire using IronPython
I'm guessing that IronPython would be the solution here since it would be triggered via a dropdown.
I have four hierarchy filters on an anylitc with four tabs. I need to pick a hierarchy (via a dropdown let's say) on tab1 which will hide: "store hierarchy", "product hierarchy", and "associate hierarchy" but will show "tender hierarchy".
I'm looking for a kind rotating hierarchy where only one is visible at a time.
I can't seem to make this work throughout the entire analytic (all tabs) nor do I know how to get the handle to set the others to false.
from Spotfire.Dxp.Application.Filters import *
from Spotfire.Dxp.Application import PanelTypeIdentifiers
for panel in Document.ActivePageReference.Panels:
if panel.TypeId == PanelTypeIdentifiers.FilterPanel:
for group in panel.TableGroups:
if group.Name == "Report Information link":
filterItem = group.GetFilter(Document.Properties["VisibleHierarchy"])
filterItem.Visible = True