Jump to content

How to get all the values of the ListBoxFilter using IronPython


Laxmi Acharya

Recommended Posts

Hi,

I want to get all the values of the ListBoxFilter without iterating through the rows of column using ironpython

Reference:

https://community.spotfire.com/questions/need-help-how-assign-selected-valu...

here in the above link source code - have iterated through the column values

but instead i want all the unique values through filter only.

Thanks.

Link to comment
Share on other sites

Check below two options:

1. https://community.spotfire.com/questions/how-can-get-values-list-box-filter...

2.

######################################################################

from Spotfire.Dxp.Application.Visuals import VisualContent

from Spotfire.Dxp.Application import Filters as filters

from Spotfire.Dxp.Application.Filters import FilterTypeIdentifiers

out=""

# Get the filter panel on the current active page

filterPanel = Document.ActivePageReference.FilterPanel

# Perform filtering action

for tableGroup in filterPanel.TableGroups:

for fh in tableGroup.FilterHandles:

if fh.Visible:

if (fh.FilterReference.TypeId == FilterTypeIdentifiers.ListBoxFilter):

cbFilter = fh.FilterReference.As[filters.ListBoxFilter]()

for checkedValues in cbFilter.SelectedValues:

out+=checkedValues+"n"

Document.Properties["Debug"] = out

######################################################################

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