Sharing your Analysis


In earlier posts, we discussed how to share your analysis with others using a variety of approaches.  With the release of version 3.3 of TIBCO Spotfire, there are quite a few more approaches available.
The major update is that Spotfire now provides a way to execute a Bookmark and a Configuration Block directly when launching Spotfire and opening a file. This is supported in both the Web Player and Professional clients.

Launching analysis files via URL
To open Spotfire Professional and launch a file from the library, Spotfire 3.3 provides a URI mapping. The following example will open a new instance of Spotfire Professional, and once logged in, will open the file called SelfDrilling from the library inside a folder called MyFiles.

 tibcospotfire:server:http%3a//myserver/:analysis:/MyFiles/SelfDrilling

To launch the same file from the library in Spotfire Web Player, you can use a more standard URL:
 

http://myserver/SpotfireWeb/ViewAnalysis.aspx?file=/MyFiles/SelfDrilling

NOTE: This capability regarding the Web Player has been possible well before Spotfire version 3.3

Launching with a Bookmark
In addition to just launching a file inside Spotfire, starting in version 3.3, it is possible to apply a bookmark immediately as the file loads (in either the Web Player or Professional client).
This is done by appending the bookmark query parameter to the URLs listed earlier. The bookmark query parameter takes in a GUID specific to the bookmark.  To retrieve the full URL to use, you can choose the Copy Bookmark URL option for your specific bookmark from the Bookmark Panel. There is a link for the Web Player and one for the Professional client.


You then have a URL which you can paste directly into a web browser. This link can be shared via email or social media streams like TIBBR. Below is one such link for the Web Player

http://myserver/SpotfireWeb/ViewAnalysis.aspx?file=/MyFiles/SelfDrilling &bookmark=b249f05c-a76d-4da7-9909-454dbf2eb86c

With the addition of this feature, along with the updates to bookmarks in 3.3 which allow you to capture Visualization settings and  Document Properties, you can very easily share insights in your analysis files. Before capturing the bookmark in TIBCO Spotfire Professional, you can update a Text Area with some comments on your analysis you want to share. Then, when you capture the bookmark, make sure you chose to capture ‘ Page Layout and Visualizations’.  

 


 
When the URL is shared and opened, the updated contents of the Text Area will be shown as well to give the user some insight into the file.  If the person who is creating the bookmark is using the Spotfire Web Player and not Professional client, they will not be able to edit the contents of a Text Area.  Rather, the author of file should create a Multi-line input field Property Control, and allow the user to add their comments in there. When the bookmark is captured, the ‘Properties’ option should be checked to make sure the status of the property is persisted.


 
Launching with Configuration Blocks
In addition to bookmarks, you also have the ability to launch a file and pass in a configuration block. A configuration block is a string which configures the initial state of an analysis.  It allows you to do two things. First, pass in parameters which will be used in information links for retrieving data, and then set the initial state of the analysis, like which page to be on, or how the filtering and marking should work.
Configuration blocks have been around since version 3.1, but they previously required either Automation Services or our APIs to execute.
Details on what is supported in a configuration block can be found at http://stn.spotfire.com/stn/Tasks/CreatingConfigurationBlock.aspx?usterms=configuration+block&uscat=0,1,2,3&uswords=%22configuration%20block%22
There is no User Interface to build the Configuration Block URL for you , like the bookmark panel offers, so you will need to build it from scratch. The name of the query parameter to include is configurationBlock and you set it equal to the block values.


For example, if you want to load a Spotfire analysis file in the Web Player and preset the filtering so that the filter for the column ‘Product Category’ is only set to ‘Vintage Cars’ you can use the following URL:

http://myserver/SpotfireWeb/ViewAnalysis.aspx?file=/MyFiles/SelfDrilling&configurationBlock=SetFilter(columnName="Product Category",values={"Vintage Cars"});

Another good use case would be to pass in values to a parameterized information link directly via the URL. Suppose you have one analysis file which shows sales data for four regions. You can distribute one URL which will load the entire analysis file, and then you can pass out other URLs, one for each regional manager. In those URLs we pass in the parameter value to load only data from their region.