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.

Below are three examples of personalized information links. The first will retrieve data depending on which user is logged in, the second depending on which groups that user is a member of. There is also a third option used to make sure that users with the same name, but from different domains will not automatically have access to the same data.

Syntax

The syntax for the personalized information link parameters is:

%CURRENT_USER%

and

%CURRENT_GROUPS%

and

%CURRENT_USER_DOMAIN%

See below for examples.

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 of 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

Then you must create a "Lookup Table" on the data source, that matches the Employee ID to the actual Spotfire Username for each person logging into the TIBCO Spotfire Server.

Spotfire Username

Employee ID

mikesmith

101

lauraclarke

150

sarahdonovan

244

malcolmreynolds

339

Next, you 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 will be used in the information link.)

id_personalized_username.png

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.

Note: 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 superfluous 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, you 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.)

id_personalized_region.png

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%)

See also:

Defining a Column Filter

Creating a Filter Element