Using Built-in Actions vs Script Controls


In TIBCO Spotfire version 3.1, there are multiple ways to expose additional controls to a consumer via the Spotfire Web Player. We have
already discussed Property Controls as well as Script Controls.  In addition to these two features, there are
also some built-in actions.


When inserting links into TIBCO Spotfire
versions 2.0 ' 3.0, you had the ability to use some built-in functions as shown below.
However, these functions would not appear in the Web Player.  Instead, the consumer would see a broken link.


 




 


In TIBCO Spotfire 3.1, when inserting an
Action Control, the same functions, as well as some additional ones are there.  All of these functions now will work in the Web Player. 
There is no need to create a script, for example, to reset all filters
or visible filters, as this is done as a function.


 





Where you would need to use a script is if
you wanted to do something that was similar, but not exactly the same as on
this list. For example, if you only wanted to reset the filters for a specific
table, you could expose the table names as a property control and then send the
selected value as an input parameter to your script, which would then loop
through all columns in the inputted table and reset their respective
filters.  The code for such a script is
shown below:


 


from Spotfire.Dxp.Application import Filters
as filters


myPanel =
Document.ActivePageReference.FilterPanel


 


#whichTable below is a string input parameter
which is connected to a Property


for col in
Document.Data.Tables.Item[whichTable].Columns:


    myFilter=
myPanel.TableGroups[0].GetFilter(col.Name)


    myFilter.FilterReference.Reset()

 



This post also marks our 6 month anniversary. We have been doing weekly posts since mid October. Tell us what you think? We plan on continuing to do tip of the weeks, but we would like to hear from you to know if you are reading and enjoying them and if you have other categories (more API ones, more admin ones, less technical ones, more technical ones, etc...) you'd like us to write tips on.
Thanks!