Jump to content

How to pass same filter column value from One filtering scheme to another


Prashant

Recommended Posts

Hi Prashant, 

In this case you can use the same filtering scheme,  but may be your requirement might be different, so for that,  I would recommend,  you can add python script to selected value from 'fs1' to select same values in 'fs2' when navigating to 'tab1' to 'tab2'.  

some sample script to get/set selected values,  this will not serve your exact purpose. 

------Get selected value-----
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

-----------
--------------- Make the selected value
from Spotfire.Dxp.Application.Filters import CheckBoxFilter

#refer to filter as checkbox

myYearFilter=Document.FilteringSchemes[0].Item[myDataTable]["YEAR_ID"].As[CheckBoxFilter]()

#print myYearFilter
for value in myYearFilter.Values:
myYearFilter.Check(Document.Properties['Year'])

---------------

Regards, 

Velmurugan

Link to comment
Share on other sites

Hi Prashanth,

You can create a document property and assign the x value from fs1 to it then set the document property value to x in fs2 in iron python script.

Thanks,

Viji

 

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