If you are unable to create a new account, please email support@bspsoftware.com

 

CAMIDList() error when trying to add the security in Frame work manager

Started by siyad, 23 Apr 2013 11:24:04 AM

Previous topic - Next topic

siyad

Dear Cognos Gurus,

FM version: 10.1.1 on windows

I am trying to implement the row level security in FM and because we have differnt level of security rules on different dimensions, I need to add a security filter in the dimension query subject of FM like this.

column =
#
grep('securitygroup:Location:CostCentre',CAMIDList())
)
#

I have recieved the first error saying that the CAMIDList() function returns a string and grep needs an array. However when I use the array(CAMIDList()) at the end of the above expression, I am getting the following error

QE-DEF-0260 Parsing error before or near position: 58 of: "[Relational View].[Dimension].[SecColumn]   in array_tbd"

I am not sure, what am I missing to get this working.

Thank you in advance
Rgs,
Siyad

CognosPaul

CAMIDList returns a string of pieces of a user's identity separated by a string. The array function creates an array from a list of strings or other arrays.

What you need to accomplish is to first split the CAMIDList results into an array, then use the grep function. The grep function returns an array as well, so you'll need to join them back together as a csv.

For example, at one of my clients they needed to filter by the state field. The codes were along the lines of MA, ME, MI, PA. Users were assigned to groups StateGroup_PA, StateGroup_OH. The security filter was (from memory):

[NS].[Dim].[State] in (#csv(substitute('StateGroup_','',grep('StateGroup_',CAMIDList()))#)

First I'd get an array of the user identity elements, grep the ones I need, transform them into the format I need, then return them as a comma separated strings.

siyad

Thanks Paul... as always explained it clearly and precisely...most appreciated