When a parameterized Information Link is used in a Spotfire analysis, it may be assumed that the parameter values provided while importing the Information link shall be saved in the analysis and the same parameter values are used by Scheduled Updates while caching the analysis or just opening the analysis on the TIBCO Spotfire Web Player. But this is not the case.
When parameter values are passed to a Stored Procedure through an Information Link, if you only follow the below steps, your cache refresh for the analysis using Scheduled Updates will fail.
Scenario 1: Stored Procedure with no default value
- Create a Stored Procedure element with Prompt value as "None"
- Import the Stored Procedure element in an Information Link. If you click the "SQL..." button the SQL will be like: { call "SYSTEM"."F_GET_COUNTRIES"(?) }
- Refresh the Parameter section in the Information Link. As no default value for the parameter is specified, it will show nothing. So you may edit the SQL by providing a parameter name like { call "SYSTEM"."F_GET_COUNTRIES"(?inputparameter) }. Now refresh the parameter section in the Information Link and you will find "inputparameter" with the option to set its data type and value type
- Save the Information Link
- In the analysis, select File > Add Data Tables > Add > Information Link and select the Information Link saved in Step 4. It will prompt for inputparameter value and load the data based on the provided value.
- Save the analysis in the Library
Scenario 2: Stored Procedure with a default value
- Create a Stored Procedure element with Prompt value as "None" and default value as ?inputparameter
- Import the Stored Procedure element in an Information Link. If you click the "SQL..." button the SQL will be like: { call "SYSTEM"."F_GET_COUNTRIES"(?) }
- Refresh the Parameter section in the Information Link and you will find "inputparameter" with the option to set its data type and value type
- Save the Information Link
- In the analysis, select File > Add Data Tables > Add > Information Link and select the Information Link saved in Step 4. It will prompt for inputparameter value and load the data based on the provided value.
- Save the analysis in the Library
Now the input parameter value provided at time of loading data is not saved in dashboard, it is just for initial testing of data. Parameter values need to be passed programmatically through an on-demand data tables in TIBCO Spotfire Analyst otherwise it will fail on TIBCO Spotfire Web Player and every time you reload the analysis in the TIBCO Spotfire Analyst client, you will get a dialog box to enter the parameter value.
There may be other scenarios where you need to use same Information Link in multiple analysis files but with different parameter values, so you would want to embed the parameter value in each analysis individually.