Jurjen Steel Posted June 28, 2019 Share Posted June 28, 2019 Dear all, I would like to have a Python script that allows me to reset aspecificfiltering scheme. This filtering scheme does notnecessarily need to be the active filtering scheme on the page. For resetting all filtering schemes I am using the script below, but I also would like to have a script the allows me to rest only 1 specific filtering scheme. Can anyone help me out here from Spotfire.Dxp.Data import * from Spotfire.Dxp.Application.Filters import * def resetAllFilteringSchemes(): # Loop through all filtering schemes for filteringScheme in Document.FilteringSchemes: # Loop through all data tables for dataTable in Document.Data.Tables: # Reset all filters filteringScheme[dataTable].ResetAllFilters() # Call the function resetAllFilteringSchemes() Many thanks in advance! Kind regards, Jurjen Link to comment Share on other sites More sharing options...
Shandilya Peddi Posted June 28, 2019 Share Posted June 28, 2019 You can do something as below for fs in Document.FilteringSchemes: print fs.FilteringSelectionReference.Name if fs.FilteringSelectionReference.Name == "Filtering scheme": fs.ResetAllFilters() Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now