Page 1 of 1

ELPAR in Rule

Posted: Wed Feb 21, 2024 4:38 pm
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

Re: ELPAR in Rule

Posted: Wed Feb 21, 2024 7:34 pm
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 ?

Re: ELPAR in Rule

Posted: Thu Feb 22, 2024 9:27 am
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.