Sony - Posted August 17, 2016 Share Posted August 17, 2016 Hello experts... can anyone please help me on python scripts for th below scenarios :- 1. getting values from filtering scheme (listbox filter) e.g. I have a YEAR filter, whatever values i am selecting, i want to retrieve those values.. including "ALL" values also. 2. if 2015, 2016 is selected from Year, I want those values to be in this format : '''2015'',''2016''' 3. Assigning those values to a property control. Thanks in advance... Link to comment Share on other sites More sharing options...
Tirupathi Mangalarapu Posted August 18, 2016 Share Posted August 18, 2016 Hello Sunita, Please use below script as a reference and try to build from here: #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 Link to comment Share on other sites More sharing options...
Kirsten Gustafson 2 Posted June 16, 2019 Share Posted June 16, 2019 Thanks for this! Worked great for my application. For other Python newbies out there like me, be sure to include this at the top: from Spotfire.Dxp.Application.Filters import * 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