Purchase your Section 508 Compliance Support guide now!

Purchase your Section 508 Compliance Support guide now!

Cognos 8 -- Framework Manager macro to get user identity info

Here are a couple of FM macros that I came across while trying to find all users that belong in the Administrators group.  My requirement was to render a pie chart to the user on the Report Studio report page if they belonged to a specific Finance group.
 
CAMIDList

Returns the pieces of the user's identity (account name, group names, role names) as a list of

values separated by commas.

Syntax

CAMIDList ( [ separator_string ] )

Example

#CAMIDList ( )#

Result: CAMID("::Everyone"), CAMID(":Authors"), CAMID(":Query Users"),

CAMID(":Consumers"), CAMID(":Metrics Authors")
 
 

CSVIdentityName

Use the identity information of the current authenticated user to lookup values in the specified

parameter map. Each individual piece of the user's identity (account name, group names, role

names) is used as a key into the map. The unique list of values that is retrieved from the map is

then returned as a string, where each value is surrounded by single quotes and where multiple

values are separated by commas.

Syntax

CSVIdentityName ( %parameter_map_name [ , separator_string ] )

Example

#CSVIdentityName ( %security_clearance_level_map )#

Result: 'level_500' , 'level_501' , 'level_700'

 

CSVIdentityNameList

Returns the pieces of the user's identity (account name, group names, role names) as a list of

strings. The unique list of values is returned as a string, where each value is surrounded by single

quotes and where multiple values are separated by commas.

Syntax

CSVIdentityNameList ( [ separator_string ] )

Example

#CSVIdentityNameList ( )#

Result: 'Everyone' , 'Report Administrators' , 'Query User'