Page 1 of 1
Alternate ways to create an Element Security cube?
Posted: Tue Mar 22, 2016 3:48 am
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...
Re: Alternate ways to create an Element Security cube?
Posted: Tue Mar 22, 2016 4:20 am
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.
Re: Alternate ways to create an Element Security cube?
Posted: Tue Mar 22, 2016 4:22 am
by fleaster
ok good idea.. thanks for the tip!

Re: Alternate ways to create an Element Security cube?
Posted: Tue Mar 22, 2016 1:14 pm
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.
Re: Alternate ways to create an Element Security cube?
Posted: Tue Mar 22, 2016 2:33 pm
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;
Re: Alternate ways to create an Element Security cube?
Posted: Tue Mar 22, 2016 2:50 pm
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 ?
Re: Alternate ways to create an Element Security cube?
Posted: Tue Mar 22, 2016 2:57 pm
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.
Re: Alternate ways to create an Element Security cube?
Posted: Tue Mar 22, 2016 10:45 pm
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