Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

Getting Selected Values from a filter

from Spotfire.Dxp.Application.Filters import ListBoxFilter

#get a reference to a listbox 
filt=Document.FilteringSchemes[0][myDataTable][myDataTable.Columns["symbol"]].As[ListBoxFilter]()

#to get the active filtering reference:
#filt = Document.FilteringSchemes[Document.ActiveFilteringSelectionReference][myDataTable][MyDataTable.Columns["symbol"]].As[ListBoxFilter]()

#loop selected values
for value in filt.SelectedValues:
  print value

1 comment:

Kumar said...

I have a situation where few values from a column will not be displayed when I use data relationship between two tables (Include Filtering). However, when I use this script to fetch the selected Values I get the extra values which is not necessary. Can anyone tell me how we can fetch the selected values from the visible values of a filter.
Thanks in Advance.

Kumar