Carson King Posted July 9, 2019 Share Posted July 9, 2019 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 More sharing options...
Shashank Gurnalkar Posted July 9, 2019 Share Posted July 9, 2019 As the indexing starts from 0, it should be:myFilter= myPanel.TableGroups[4].GetFilter("Question") Also,'TextFilter' does not have 'IncludeAllValues'attribute. So you can erase or comment out this line:tFilter.IncludeAllValues=False Link to comment Share on other sites More sharing options...
Carson King Posted July 9, 2019 Author Share Posted July 9, 2019 It works! Thank you 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