ViewTitleElementSet on dimensions with element security

Post Reply
User avatar
gtonkin
MVP
Posts: 1269
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

ViewTitleElementSet on dimensions with element security

Post by gtonkin »

TM1 Server 10.2.2

Code: Select all

ViewTitleElementSet(CubeName, ViewName, DimName, Index);
FYI, do not use this command as it can return incorrect results for any dimension which has element security.

It takes as an argument an index to a dimension and it then uses that index to show a specific element. The problem is that for a dimension which is secure a user can run DIMIX/DIMNM and it will return the correct results i.e. same results as Admin even though they may not be able to see those elements. The problem comes in the view when the user looks at the title element which has been set, because it is an index pointer to the dimension based on the ALL subset it shows the nth element based on the ALL subset which that user has privileges to.

Hard to explain without seeing it in action and not sure if it is a newly introduced 10.2.2 bug either.

Please be aware of this quirk if you are thinking of upgrading to 10.2.2

@MODS -> please move to bugs-thank you
BR, George.

Learn something new: MDX Views
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: ViewTitleElementSet on dimensions with element security

Post by lotsaram »

gtonkin wrote:TM1 Server 10.2.2

Code: Select all

ViewTitleElementSet(CubeName, ViewName, DimName, Index);
FYI, do not use this command as it can return incorrect results for any dimension which has element security.

It takes as an argument an index to a dimension and it then uses that index to show a specific element. The problem is that for a dimension which is secure a user can run DIMIX/DIMNM and it will return the correct results i.e. same results as Admin even though they may not be able to see those elements. The problem comes in the view when the user looks at the title element which has been set, because it is an index pointer to the dimension based on the ALL subset it shows the nth element based on the ALL subset which that user has privileges to.

Hard to explain without seeing it in action and not sure if it is a newly introduced 10.2.2 bug either.

Please be aware of this quirk if you are thinking of upgrading to 10.2.2

@MODS -> please move to bugs-thank you
Hi George - this has nothing to do with 10.2. It is a standard feature and is not a bug.
Title elements are set by index of a defined list as opposed to by element name. This is a standard watchout - if the order of the members in the list changes or the content of the list changes then the index will of course return a different element name. In the case of element security then the member list will be different for different users, this is "expected behaviour".

Generally in the case of element security this is a good thing as it means that rather than nothing being displayed and the user receiving an error message as would be the case if selection was by name and the user had no access to the selected element then the view will return something (unless maybe the saved index value is now greater then the size of the list.) This is actually quite useful for default cube views where users should always see the 1st element they have access to for example (just make sure when setting up the subset used for the list that everyone will be able to access something from the list.)

It is something to be aware of though and should be considered EARLY in system development as if dimension structure is changed or default subset of a common dimension used in a lot of views then it can be a lot of (manual) work to go and edit views to make sure the correct element is selected.

It would be great if there was also a way to set title dimensions by element name and not index. But I can understand the way it is the way it is, precisely because of element security.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
User avatar
gtonkin
MVP
Posts: 1269
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: ViewTitleElementSet on dimensions with element security

Post by gtonkin »

Thanks lotsaram - the reason I raised it is that it is the first time we hit on this after an upgrade from 9.4 where it behaved differently. Will keep in mind going forward - seems to be similar rationale to a SUBNM where you can specify an index of say 1 and always return the first element, just as you explained.
BR, George.

Learn something new: MDX Views
Post Reply