AB123
AB123

Reputation: 163

Reset only one filter in Ironpython Spotfire

I may have a very simple question to answer, but I can't find it. I want to reset a single filter in Spotfire by using IronPython code, let's say the filter of column 'A' in filter scheme 'Z'. I don't want to reset the complete filter scheme. Can someone help?

Thank you

Upvotes: 0

Views: 1792

Answers (1)

Gaia Paolini
Gaia Paolini

Reputation: 1462

This would reset a filter for column of name mycolumn (string) in data table mytable (both need to be input parameters). The page is set as the current one and the filtering scheme as the one used on the page.

# Copyright © 2022. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
from Spotfire.Dxp.Application.Filters import *
page = Application.Document.ActivePageReference
filter_panel = page.FilterPanel
filtering_scheme=filter_panel.FilteringSchemeReference
specific_filter=filtering_scheme.Item[mytable].Item[mytable.Columns.Item[mycolumn]]
specific_filter.Reset()

Upvotes: 1

Related Questions