how to get user id from string

Post Reply
Legemza
Posts: 10
Joined: Wed Feb 02, 2011 8:30 am
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2007

how to get user id from string

Post by Legemza »

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
Alan Kirk
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

Post by Alan Kirk »

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
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.
"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.
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: how to get user id from string

Post by lotsaram »

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');
Post Reply