IBM Support

How to return the roles/groups only within Cognos namespace that a user belongs to

Troubleshooting


Problem

CSVIdentityNameList() returns the roles/groups that a user belongs to within Cognos namespace but also the namespace it's currently logged in with.
This Document describes how to return an array of the user's identities based on the identity type that can be used in a filter.

Resolving The Problem

Use the Macro Function CAMIDListForType()

CAMIDListForType(identity type) returns an array of the user's identities based on the identity type (account, group, or role). It can be used with the macro functions csv or join.

Syntax

CAMIDListForType ( identity type )

Example

[qs].[userRole] IN ( #csv ( CAMIDListForType ( 'role' ) ) # )

Result: [qs].[userRole] IN ( 'CAMID("::System Administrators")', 'CAMID(":Authors")' )

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"ARM Category":[{"code":"a8m50000000Cl4NAAS","label":"Modeling-\u003EFramework Manager"}],"ARM Case Number":"TS012447502","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"},{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Component":"Report Studio","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

Historical Number

1035591

Document Information

Modified date:
16 March 2023

UID

swg21342309