Hi,
when i use TM1USER() function in TI process, i get CAMID("CognosExpress:username") as output. how can i get only username from this string?
thanks
how to get user id from string
-
- Site Admin
- Posts: 6667
- 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: how to get user id from string
If that's the literal string that you're getting, use the Scan() function to find the location of the colon (:) character, and the Subst() function to split out the part beyond that character.Legemza wrote:Hi,
when i use TM1USER() function in TI process, i get CAMID("CognosExpress:username") as output. how can i get only username from this string?
thanks
"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.
-
- 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: how to get user id from string
You might also find that you get a more sensible output by calling the }TM1_DefaultDisplayValue alias value
i.e.
sUser = AttrS('}Clients', TM1User(), '}TM1_DefaultDisplayValue');
i.e.
sUser = AttrS('}Clients', TM1User(), '}TM1_DefaultDisplayValue');