Products | Versions |
---|---|
Spotfire Server | All supported versions |
In some cases a database stored procedure might require the current logged in username as an input to perform some operations on the database.
eg:-Insert information in a database table like comments from the logged on users analyzing the spotfire reports.In such scenarios it is useful to pass the current username to the stored procedure to identify individual comments.
For stored procedures, the variable %CURRENT_USER% needs to be specified as the default value of the input parameter to the database procedure. This means that your database stored procedure needs to take the username as input parameter.
Here are the steps to setup the procedure element:
1) Launch Spotfire Analyst, then click on Tools and Information Designer
2) Navigate to and edit the Stored Procedure element. This should show all input parameters to the stored procedure
3)To pass on the current user as an argument to the procedure just double-click on the Default value field of the associated database parameter, and enter %CURRENT_USER% while leaving the drop-down for Prompt set to 'None.'
No other changes are required to be done at the information link sql.