Jump to content

How to initialize a specific listbox filter


Min Su Sun

Recommended Posts

I want to reset the value selected in a specific listbox filter when I click a button in the text area.

For example, as shown below, the step2 value is selected in listbox B in the textarea. I want to know how to make step2 selected in B select (All) 3 values ​​when button A is clicked.

* Button A

* Value of listbox filter B:

- (All) 3 values

- step 1

- step2 (selected)

- step3

Link to comment
Share on other sites

Hi!

This can be done by using an IronPython script to reset just one filter. The script is as follows:

from Spotfire.Dxp.Application.Filters import *page = Application.Document.ActivePageReferencefilter_panel = page.FilterPanelfiltering_scheme=filter_panel.FilteringSchemeReferencespecific_filter=filtering_scheme.Item[mytable].Item[mytable.Columns.Item[mycolumn]]specific_filter.Reset()

Where mytable and mycolumn are the data table and column in question. These both need to be added as inputs into the data script as well. Then add this as an Action Control into a text area on the same page (this script relies on it all being on the same page), and you're good to go!

(This answer was also given on Stack Overflow here .)

Thanks,

Astrid

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