Spotfire® User Guide

Personalized information links

Using personalized information links you can set up a data source to return only information applicable for a certain user or group. Depending on which user is logged in and accesses the information link, different subsets of the data will be available.

For example, you could set up an information link that detects whether the user retrieving data is a member of the sales force for Europe, Asia or the US and only return data for that continent.

The following three examples demonstrate personalized information links. The first retrieves data depending on which user is logged in; the second retrieves data depending on which groups that user is a member of. The third option ensures that users with the same name, but from different domains, do not automatically have access to the same data.

Syntax

The syntax for the personalized information link parameters is as follows.

%CURRENT_USER%

and

%CURRENT_GROUPS%
and
%CURRENT_USER_DOMAIN%

User name via lookup table

Scenario: You want to set up an information link to a data table showing sales made by all the sales people in the company. However, depending on which person from the sales department accesses an analysis using this information link, only the sales figures pertaining to that single user should be retrieved.

First, take a look at the Sales table containing the total sales for every person in the sales force.

Order ID Employee ID Product Sale ($)
1 101 Cornflakes 100
2 150 Soda 550
3 244 Cornflakes 160
4 101 Mineral water 400
5 101 Soda 120
6 339 Mineral water 200

Next, create a "lookup table" on the data source that matches the Employee ID to the Spotfire username for each person logging into the Spotfire Server.

Spotfire Username Employee ID
mikesmith 101
lauraclarke 150
sarahdonovan 244
malcolmreynolds 339

Next, create a Filter or Column element that constrains the Spotfire Username column to only return values for the currently logged-in user. (In the example below, a new, restricted column element is created by adding the personalized condition as a hard filter on the column element. This is the column element that is used in the information link.)

a screen shot showing the personalized information link column element

An example of the resulting SQL for the user malcolmreynolds would be:
"LookupTable"."Spotfire Username" = 'malcolmreynolds'

Finally, you create a Join between the "Sales" table and the Lookup table—joining the Employee ID columns.

Add the restricted column element (or the filter element) to an information link, together with any other columns of interest and save it. The information link is now ready to be used and will only retrieve data for the currently logged in user.

Group membership

Scenario: You want to set up an information link to a data table showing sales made by all the sales people in the company. However, depending on which person from the sales department accesses an analysis using this information link, only the sales figures pertaining to the region that sales person is assigned to should be retrieved. For example, if a sales person is working in the East region, she should only be allowed to see sales figures made in that region (by any person).

The Spotfire Administrator has created groups on the Spotfire Server named "SalesForce-East", "SalesForce-West", "SalesForce-South", and "SalesForce-North". Each sales person is a member of one or more of these.

Tip: You can also create a lookup table, just as in the first example, in which you assign various users or groups to categories that match your "Sales" table. That way you do not need to create groups on the Spotfire Server if groups with matching names are not already available.

You then take a look at the "Sales" table containing the total sales of every person in the sales force.

Order ID Employee ID Region Product Sale ($)
1 101 SalesForce-East Cornflakes 100
2 150 SalesForce-West Soda 550
3 244 SalesForce-North Cornflakes 160
4 101 SalesForce-East Mineral water 400
5 101 SalesForce-East Soda 120
6 339 SalesForce-East Mineral water 200

Next, add a Filter or Column element that constrains the Region column so that it only returns values if the currently logged in user is a member of a group with that exact name. (In the example below, a new, restricted column element is created by adding the personalized condition as a hard filter on the column element. This is the column element that will be used in the information link.)

personalized information link for region

An example of the resulting SQL for a user belonging to the "SalesForce-East" and the "SalesForce-North" groups would be:
"SalesTable"."Region" = ('SalesForce-East','SalesForce-North')

Add the restricted column element (or the filter element) to an information link, together with any other columns of interest and save it. The information link is now ready to be used and will only retrieve data for groups that the currently logged in user is a member of.

Current user domain

Scenario: You are administrating data access for a large company, with many employees in several departments. Some of the users have the same name but should have access to different data depending on which department they are working in.

To retrieve data based on both the user name and the current user domain, use the following expression.
%1=(%CURRENT_USER%) AND %1=(%CURRENT_USER_DOMAIN%)

For more information, see Defining a column filter in Information Designer and Creating a filter element.