Page 1 of 1

Rule in checking ancestor

Posted: Thu Aug 30, 2012 7:58 am
by beek
Hi there,

Need some help here. I have a user group which requires to access to all the groups (incl child)which is having the sub-string "consumables". Any idea how can I write a rule to check if the SKU/node is having ancestor like "consumables", access =1 ?

Cheers,
Beek

Re: Rule in checking ancestor

Posted: Thu Aug 30, 2012 8:32 am
by qml
First of all, even though rule-based security is possible, I think in this case you would be much better off updating the dimension element security cube using a TI process, applying the same logic as the rule would (so put 'READ' if the criterion is matched and empty string if it is not). Implementation of this requirement in a TI is also somewhat easier than using a rule, where it would be a tricky and awkward combination of ELPAR() and SCAN() functions in nested IFs.

Personally, I would create a dynamic subset using the following formula:

Code: Select all

{TM1DRILLDOWNMEMBER( {TM1FILTERBYPATTERN( {TM1SUBSETALL( [MyDim] )}, "*consumables*")}, ALL, RECURSIVE )}
I would use this subset as the data source in my TI. In the Prolog I would zero out the relevant part of the }ElementSecurity_... cube. And finally on the Data tab I would have a bit of code to put 'READ' for each of the elements in my data source.

Re: Rule in checking ancestor

Posted: Thu Aug 30, 2012 8:54 am
by beek
Thanks for your suggestions.. ha.. now then I realised Dimension Subset can also be a data source.. :oops: