Jump to content

Reset a TextFilter with Iron Python script


Carson King

Recommended Posts

Fairly new to Iron Python Scripting

I have an action control below a text box filter that I want to use to reset the text.The column I am trying to reset the text filter on is titled "Question", and it is in the 5th data table in my analysis

Below is the script I am trying to use.

import Spotfire.Dxp.Application.Filters as filters

import Spotfire.Dxp.Application.Filters.TextFilter

from Spotfire.Dxp.Application.Filters import FilterTypeIdentifiers

from Spotfire.Dxp.Data import DataPropertyClass

from System import String

myPanel = Document.ActivePageReference.FilterPanel

myFilter= myPanel.TableGroups[5].GetFilter("Question")

tFilter = myFilter.FilterReference.As[filters.TextFilter]()

tFilter.IncludeAllValues=False

tFilter.Reset()

However when I try to run the script I get this error:

AttributeError: 'NoneType' object has no attribute 'FilterReference'

 

Any suggestions Thanks

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