Page 1 of 1
Add new element using TI process
Posted: Thu Oct 14, 2010 8:06 am
by comma
Hi,
I have created a TI process to add new element to a dimension. The list of new elements are stored in a CSV file.
The only code I have is in the Metadata tab, which is this:
Code: Select all
DIMENSIONELEMENTCOMPONENTADD('DimensionName',pRollUp,pNewElement,1.000000);
The question is, when user A who is a member of Group1 ran this TI process, the new elements are added but this A doesn't have access to the new elements.
So A cannot see the new elements.
When check in }ElementSecurity_DimensionName cube, the value in the cross between new elements and Group1 are empty.
Does anyone know why this happen? And can I resolve this?
Any suggestion is very well appreciated. Thanks.
Re: Add new element using TI process
Posted: Thu Oct 14, 2010 8:47 am
by lotsaram
As a best practice you really should have
Code: Select all
DIMENSIONELEMENTINSERT('DimensionName','',pNewElement,'N');
DIMENSIONELEMENTCOMPONENTADD('DimensionName',pRollUp,pNewElement,1);
Even though TM1 doesn't seem to be throwing any errors at you for not first defining the new element and handling the insert in the background, you should define an element before trying to add it as a child to a consolidation.
When a TI process runs it runs with admin rights not the rights of the user running the process. You have given "Group1" read rights to the process so members can run the process and add new elements. However after the process has run it doesn't follow that Group1 would have any special rights over the new elements (or even be able to see them in this case.)
Why this is happening is simple, it is because you have element security applied to the dimension. As per the manuals once element security is applied to a dimension then the
default level of access for all non admin groups to all new elements is NONE. If you want Group1 to have immediate access to the new elements then you need to write to the element security cube on the data tab, or you could use rules in the element security cube to avoid needing to set security for new elements.
If you have inadvertently applied element security and you don't ant or need it for this dimension then the only way to remove it is to stop the server, delete the element security cube and restart.
Re: Add new element using TI process
Posted: Thu Oct 14, 2010 9:25 am
by comma
Hi lotsaram,
Thanks, what you said make sense to me. I did purposely apply security to that dimension.
And I also have tried to give access to Group1 in the Data tab, by doing this:
Code: Select all
ElementSecurityCube = '}ElementSecurity_DimensionName';
AccessType = 'WRITE';
CellPutS (AccessType, ElementSecurityCube, pNewElement, 'Group1');
However, when user A ran this new modified TI process, she got an error message saying:
Code: Select all
Error: Data procedure line (10): Execution was aborted. No Security Access for "CellPutS".
I have grant Group1 Write access to cube }ElementSecurity_DimensionName, but why it still says no security access?
Thanks again for your help.
Re: Add new element using TI process
Posted: Thu Oct 14, 2010 9:40 am
by lotsaram
To write to a security cube or use any security functions you need to right-click the process and ensure that "Security Access" is ticked (see threads elsewhere).
You could then continue to use CellPutS to the }ElementSecurity_Dimension cube followed by a SecurityRefresh, however it would probably be better to use the ElementSecurityPut TI function:
ElementSecurityPut(Level, DimName, ElName, Group);
Re: Add new element using TI process
Posted: Thu Oct 14, 2010 11:42 am
by comma
Thanks a lot, lotsaram, it worked now!
And I don't have to grant Group1 Write access to }ElementSecurity_DimensionName, too.
Btw, back to your first reply:
lotsaram wrote:Even though TM1 doesn't seem to be throwing any errors at you for not first defining the new element and handling the insert in the background, you should define an element before trying to add it as a child to a consolidation.
Is there any particular reason why I should define the element first before adding it as a child? I'm just curious.