ELPAR in Rule

Post Reply
MarenC
Regular Participant
Posts: 350
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

ELPAR in Rule

Post by MarenC »

Hi,

I am creating some security rule which says if the parent is 'WRITE' then make the child 'WRITE' too.

I am using the following:

Code: Select all

[]=S:
 IF( ELLEV('Cost Centre', !Cost Centre) = 0 & DB('}ElementSecurity_Cost Centre', ELPAR('Cost Centre', !Cost Centre,1),!}Groups) @= 'WRITE',
  'WRITE', 'NONE');
The parent security rule is as follows:

Code: Select all

[]=S:
	IF( 'grp_' | ATTRS( 'Cost Centre', !Cost Centre,'Business Partner' ) @= !}Groups,
		'WRITE', CONTINUE);
So if the Business Partner attribute of Cost Centre Parent "North" = the Group, then give group WRITE access to all cost centres under "North".

I don't like the idea of using ELPAR but I couldn't think of an alternative without doing something with the Business Partner Attribute.
Does anyone have any other suggestions?

Maren
Wim Gielis
MVP
Posts: 3120
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: ELPAR in Rule

Post by Wim Gielis »

Of you can turn it into a parent-child relation, why not store the parent name in a string value for the child ?
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
User avatar
Steve Rowe
Site Admin
Posts: 2417
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: ELPAR in Rule

Post by Steve Rowe »

For something as slow changing as this I would populate with a TI and hang the script for it off whatever TI is looking after updates to the Cost Centre dimension.
This way there is no need for SecurityRefresh to get rule changes reflected in the security model, once you have to kick the system to get changes reflected then you may as well of done a TI anyway.
Technical Director
www.infocat.co.uk
Post Reply