Jump to content

Reset a specific filtering scheme by using a Python script


Jurjen Steel

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...