IronPython Code to reset all applied visible filters:
import Spotfire.Dxp.Application.Filters as filters from Spotfire.Dxp.Application.Filters import * # Navigate through each page in the analyses for eachPage in Document.Pages: # Get the active data table in the current page activeTable = eachPage.ActiveDataTableReference # Get the set of all table groups in the current page tableGroup = eachPage.FilterPanel.TableGroups # Navigate through all the table groups in the filter panel of current page for t in tableGroup: # To filter on the active data table used in the filter panel if (t.Name == activeTable.Name): # In table group (data table), navigate through the filter groups for filterSubGroup in t.SubGroups: # Navigate through the filters in each filter group for filterHandle in filterSubGroup.FilterHandles: filterReference = filterHandle.FilterReference # Reset if the filter is visible if filterHandle.Visible==True: filterReference.Reset() print "Reset done for: " + eachPage.Title + '.' + t.Name + '.' + filterSubGroup.Name + '.' + filterReference.Name if filterHandle.Visible==False: print "Reset not done for: " + eachPage.Title + '.' + t.Name + '.' + filterSubGroup.Name + '.' + filterReference.Name
Please take note that this script can be used to not reset the hidden filters in the analyses. That is, this will reset all the visible filters which are part of filter groups across all the pages in the analyses.
Snapshot for indentation reference: