Rule in checking ancestor

Post Reply
beek
Posts: 63
Joined: Wed Sep 14, 2011 3:10 am
OLAP Product: TM1
Version: PA 2.0
Excel Version: Office 365

Rule in checking ancestor

Post 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
User avatar
qml
MVP
Posts: 1098
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: Rule in checking ancestor

Post 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.
Kamil Arendt
beek
Posts: 63
Joined: Wed Sep 14, 2011 3:10 am
OLAP Product: TM1
Version: PA 2.0
Excel Version: Office 365

Re: Rule in checking ancestor

Post by beek »

Thanks for your suggestions.. ha.. now then I realised Dimension Subset can also be a data source.. :oops:
Post Reply