Jump to content

Script to change filter scheme of List Box Filter in text area

Luiz Eduardo Zappa

Recommended Posts


I've found a script that change the page filter scheme based on the selection of a dropdown list (i pasted the code below). The problem is that i have a List Box Filter in text area, and these filter scheme does not change, and i need to change this too.. I've searched the web, but didn't find any example of changing filter scheme of a filter in text area (see attached image, this is the filter i'm refering). And ideia how can i achieve this

Script to change the page filter scheme

from Spotfire.Dxp.Application.Filters import FilterPanel

panels = Document.ActivePageReference.Panels

(found, filterPanel) = panels.TryGetPanel[FilterPanel]()

for filteringScheme in Document.FilteringSchemes:

filteringSelection = filteringScheme.FilteringSelectionReference

if filteringSelection.Name == (MyFilterScheme):

filterPanel.FilteringSchemeReference = filteringScheme

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...