Setting Filters using Query String Parameters (Webplayer)

Spotfire Configuration Blocks allows you to set filters, change document properties by passing values by using additional parameters to the url link


Examples:

Filter Apples from Sales table on the FruitMart analysis file
http://webplayer/ViewAnalysis.aspx?file=/FruitMart&configurationBlock=SetFilter(tableName="Sales",columnName="Fruit",values={"Apples"});

Filter Apples and Bananas from Sales table 
http://webplayer/ViewAnalysis.aspx?file=/FruitMart&configurationBlock=SetFilter(tableName="Sales",columnName="Fruit",values={"Apples","Bananas"});



Configuration Blocks are case sensitive when it comes to passing parameter values. Here are some (good and bad) examples:
  • Spaces: tableName="Sales" vs tableName=" Sales "
  • Quotes. For example, Outlook converts " to , so better use notepad to construct your links: tableName="Sales" vs tableName=”Sales”
  • Exact match: values={"Electronics", "Furniture"} vs values={"electroNics", "furniture"}
·        Note: parameters are case insensitive: TableName vs tablEName (both are OK)




Reference: http://www.tibco.com/blog/2014/10/16/parameterizing-your-dashboard/  
Documentation: http://stn.spotfire.com/stn/Tasks/CreatingConfigurationBlock.aspx

( ͡° ͜ʖ ͡°)         ٩(͡๏̯͡๏)۶

2 comments:

Abhijith Shetty said...

If I would want to use the configuration block to filter out data from two columns present in two separate datatables, how should I write the configuration block for the webplayer link?

Jose Leviaguirre said...

Hello Abhijith,

Not sure how to do that, but for complex 'configuration blocks' you can always use bookmarks and use the bookmar url for this purpose.