Hi all,
Is there TM1User() or USERNAME equivalent function in 9.0 SP2?
Regards
Andre
TM1User function
-
- Site Admin
- Posts: 6644
- 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: TM1User function
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...?andre lie wrote: Is there TM1User() or USERNAME equivalent function in 9.0 SP2?
"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.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Re: TM1User function
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
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
-
- Site Admin
- Posts: 6644
- 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: TM1User function
Take a look at Steve Vincent's MDX methodology described in this thread: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
http://applixforum.olapforums.com/viewP ... adID=16409
I've not had the need to use it myself, but it may deliver what you need.
"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.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.