Page 1 of 1
TM1User function
Posted: Tue Mar 31, 2009 1:56 am
by andre lie
Hi all,
Is there TM1User() or USERNAME equivalent function in 9.0 SP2?
Regards
Andre
Re: TM1User function
Posted: Tue Mar 31, 2009 1:59 am
by Alan Kirk
andre lie wrote:
Is there TM1User() or USERNAME equivalent function in 9.0 SP2?
Short answer, "No, only 9.1 onwards", longer answer "In what context do you need it, because there are a few workarounds". Are we talking about TI, excel worksheet, web...?
Re: TM1User function
Posted: Tue Mar 31, 2009 2:27 am
by andre lie
Thanks Alan,
I want to drill from one cube to relational table, let say the sales table which contains sales employee id field. I want to add facility in the drill process so that user can specify a single sales employee id so that the returned result is not too many. So I have a second cube where the user will input the single employee sales id he wants to look at.
One of the dimensions in this second cube is }Clients. My initial purpose is that user input the sales employee id according to their user name element in }clients dimension. And i have created a TI process to update }clients dimension that the user must run before inputing the sales employee id so that they don't overwrite othe people's values
------------
ViewSubsetAssign('z_drill_msisdn', 'default', '}clients', 'dummy');
mdx='{TM1FILTERBYPATTERN( {TM1SUBSETALL( [}Clients] )}, "'|TM1User()|'")}';
SubsetDestroy('}clients','subset1');
SubsetCreatebyMDX('subset1',mdx);
ViewSubsetAssign('z_drill_msisdn', 'default', '}clients', 'subset1');
-------------
The above code works if i use 9.4. But I just realized that the TM1User() does not exist in 9.0
An alternative that I think is to create element security for each user on }clients dimension, so that they can only access their user name element in the second cube. The problem is there are 300 hundreds of registered user, meaning that i have to create 300 groups which is not practical
Please advise
Regards
Andre
Re: TM1User function
Posted: Tue Mar 31, 2009 3:19 am
by Alan Kirk
andre lie wrote:Thanks Alan,
I want to drill from one cube to relational table, let say the sales table which contains sales employee id field. I want to add facility in the drill process so that user can specify a single sales employee id so that the returned result is not too many. So I have a second cube where the user will input the single employee sales id he wants to look at.
One of the dimensions in this second cube is }Clients. My initial purpose is that user input the sales employee id according to their user name element in }clients dimension. And i have created a TI process to update }clients dimension that the user must run before inputing the sales employee id so that they don't overwrite othe people's values
Take a look at Steve Vincent's MDX methodology described in this thread:
http://applixforum.olapforums.com/viewP ... adID=16409
I've not had the need to use it myself, but it may deliver what you need.