Alternate ways to create an Element Security cube?

Post Reply
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Alternate ways to create an Element Security cube?

Post by fleaster »

Ok, I feel really dumb for asking this question, but here goes... :)

...for the Account dimension, I am trying to trigger creation of its associated element security cube (i.e. }ElementSecurity_Account) - however, the only way I can do this (from experience), is if I right click on the dimension, Select Security > Element Security Assignments, edit and save... then the security cube will be generated.

The problem with this method, is the dimension contains millions of elements, hence it freezes when trying to load the list of elements.

Is there a way to create the element security cube other than the manual right click? :)

Thanks!

Matt

P.S. I know there is a TI function for CellSecurity, but wasn't sure if there was one for ElementSecurity...
Alan Kirk
Site Admin
Posts: 6647
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Alternate ways to create an Element Security cube?

Post by Alan Kirk »

fleaster wrote: Is there a way to create the element security cube other than the manual right click? :)
...
P.S. I know there is a TI function for CellSecurity, but wasn't sure if there was one for ElementSecurity...
If you use the ElementSecurityPut() function in a TI, and the }ElementSecurity_ cube doesn't already exist, the cube will be created. Just be aware that by default any elements / groups that you don't explicitly assign security to in this way will have a security value of WRITE, not NONE. (This makes sense, as effectively the users had write access before the security cube was created.) Of course, if you add new elements to the dimension after the security cube has been created in this way, the new elements will have a default value of NONE just as you would expect.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Re: Alternate ways to create an Element Security cube?

Post by fleaster »

ok good idea.. thanks for the tip! :)
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Alternate ways to create an Element Security cube?

Post by lotsaram »

Just in case it wasn't obvious from Alan's post to create the element security cube with ElementSecurityPut via TI you do need to make sure that the function puts a value that isn't 'WRITE' e.g. ElementSecurityPut( 'READ', cDimTgt, vEle, vGrp ). As implicitly where there is no element security there is universal write access then if you do ElementSecurityPut( 'WRITE', cDimTgt, vEle, vGrp ) the server will interpret this as "nothing to change here" and not create the security cube.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
User avatar
Ajay
Regular Participant
Posts: 183
Joined: Wed May 14, 2008 8:27 am
OLAP Product: TM1
Version: 10.2.0, PA 2.0.9
Excel Version: 2016
Location: London

Re: Alternate ways to create an Element Security cube?

Post by Ajay »

Hi Matt

When I know that I need a dimension that needs, say attributes and security, I normally add them when I create the dimension, see below...............million ways to skin a cat, and all that !!! But agree with the above

HTH
Ajay

Code: Select all

# ==============================================================================
# Purpose:
# This process creates a dimension
# ==============================================================================

# ==============================================================================
# Variables
# ==============================================================================
csDim = 'DimensionYouWant' ;
csDimAttr = '}ElementAttributes_' | csDim ;
csDimSec = '}ElementSecurity_' | csDim ;


# ==============================================================================
# Create dimension if it doesn't exist
# ==============================================================================

IF ( DimensionExists ( csDim ) = 0 ) ;
	DimensionCreate ( csDim ) ;
	DimensionCreate ( csDimAttr ) ;
	DimensionCreate ( csDimSec ) ;
ENDIF;
Wim Gielis
MVP
Posts: 3230
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Alternate ways to create an Element Security cube?

Post by Wim Gielis »

Ajay wrote:Hi Matt

When I know that I need a dimension that needs, say attributes and security, I normally add them when I create the dimension, see below...............million ways to skin a cat, and all that !!! But agree with the above

HTH
Ajay

Code: Select all

[/quote]

Do you also create the cubes '}ElementAttributes_' | csDim and '}ElementSecurity_' | csDim ?
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
qml
MVP
Posts: 1096
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: Alternate ways to create an Element Security cube?

Post by qml »

Ajay wrote:When I know that I need a dimension that needs, say attributes and security, I normally add them when I create the dimension, see below...............million ways to skin a cat, and all that !!! But agree with the above
Ajay, the '}ElementSecurity_YOURDIM' dimension makes no sense - there is no possible use for it. The '}ElementAttributes_YOURDIM' dim is of little use unless you also create the '}ElementAttributes_YOURDIM' cube - both of which get created when you do AttrInsert, so not much point in that either.

What would make sense is this:

Code: Select all

IF( CubeExists( '}ElementSecurity_YOURDIM' ) = 0 );

	CubeCreate(
		'}ElementSecurity_YOURDIM',
		'YOURDIM',
		'}Groups'
	);
ENDIF;
A security cube created in this way works fine and TM1 understands that it's a control cube, so this is a usable alternative to doing a single ElementSecurityPut.
Kamil Arendt
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Re: Alternate ways to create an Element Security cube?

Post by fleaster »

thanks all for the feedback!
Ajay wrote:Hi Matt

When I know that I need a dimension that needs, say attributes and security, I normally add them when I create the dimension, see below...............million ways to skin a cat, and all that !!! But agree with the above

HTH
Ajay
Ajay, I have to concur with the others - as the } cubes are system generated, it's generally better to let TM1 create these itself. The trick is finding the right trigger that will cause it to be generated e.g. "AttrInsert" to generate the attributes cube, "ElementSecurityPut" to generate the element security cube etc
Post Reply