TI Process to put element security

Post Reply
dharav
Regular Participant
Posts: 193
Joined: Wed Apr 02, 2014 6:43 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2010

TI Process to put element security

Post by dharav »

Hello All

I want to create TI process to put element security for all groups. There are 4000 elements and 164 groups.

Suppose i have A,B,C,D regions under Total header. I want to apply non security for everyone and Specific element security group wise as below.

First, I want to assign 'NONE' Security to all groups to all regions
Now, I want to assign 'Write' Access to region B and remaining has none access

How could apply in to TI?

Total
A
1
2
3

B
4
5
6

C
7
8
9


D
1
2
3

I thought to utilize the Element Security Put function in TI but it seems to apply manual security than this. I need some input to throw light on this issue.

Thanks

Dharav
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: TI Process to put element security

Post by rmackenzie »

dharav wrote:Suppose i have A,B,C,D regions under Total header. I want to apply non security for everyone and Specific element security group wise as below.

First, I want to assign 'NONE' Security to all groups to all regions
Now, I want to assign 'Write' Access to region B and remaining has none access
So if you wrote it as a rule, it would go:

Code: Select all

[{'4', '5', '6'}] = S: 'WRITE';
[] = S: 'NONE';
Because per your post, only elements 4, 5 and 6 are in Region B. Is that what you are asking for?
Robin Mackenzie
pandinus
Posts: 78
Joined: Tue Mar 18, 2014 8:02 am
OLAP Product: TM1, Cognos Express
Version: 10.2.2
Excel Version: 2013

Re: TI Process to put element security

Post by pandinus »

To realise this in TI all you need is a simple loop, see code example.
In my experience fixed-security (by means of manual input, or TI) provides better performance than rule-derived security.

Code: Select all

r = DIMSIZ('Region');
WHILE(r > 0);
  vRegion = DIMNM('Region', r);

  g = DIMSIZ('}Groups');
  WHILE(g > 0);
    vGroup = DIMNM('}Groups', g);

    IF(ELISANC('Region', 'B', vRegion) = 1 % vRegion @= 'B');
      CellPutS('WRITE', '}ElementSecurity_Region', vRegion, vGroup);
    ELSE;
      CellPutS('NONE', '}ElementSecurity_Region', vRegion, vGroup);
    ENDIF;

    g = g - 1;
  END;

  r = r - 1;
END;
Surely you may need to change the IF-statement to suit your needs.
Post Reply