Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

A problem with OsUser() function

Hello,

the OsUser() function returns to me "domain sername" instead of "domain\Username".

Has anyone ever had the same problem?

Thanks.

N.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

=UPPER(OSUSER() )

View solution in original post

13 Replies
Clever_Anjos
Employee
Employee

First, try =OSUser() using a textbox, same issue?

Anonymous
Not applicable
Author

nope, wud return User name only

Mark_Little
Luminary
Luminary

Hi,

Not a issue i have come a across. If it is causing an issue a work around could be

=Replace(OSUser(),' ','\')

Hope this helps

Mark

Anonymous
Not applicable
Author

Yep, Clever

Anonymous
Not applicable
Author

Hi Mark,

your workaround fixes only one of the two problems: the OsUser() functions losts the "\" AND the first charater of the username.

(To be very accurate it lostd the "\" and the first char of the user AND it replace it with a <return> char!!)

Pls have a look to my screenshot

Not applicable
Author

I just used the =OSUser() function in a text box and it returnedfor me what I believe you are expecting - domainname\username

the only difference I see is my username is a single name without the period, which should not cause an issue

swuehl
MVP
MVP

Does this issue only happen when the first char is 'n'? Then '\n' is interpreted as line break.

What if you write:

=OSUser() = 'NETSIMEC\nicola.perrone'

does it return true or false?

beck_bakytbek
Master
Master

Hi edp,

you can use this function on the base of Excel-sheet:

= only({<Your Domane ={"$(=OSUser())"}>}>YourDomaneUsername.  First: Column in your Exel is YourDomane, and the second Column in your Excel-Shet: YourDomaneUsername. It is straithforward. so you can concatenate your DomaneName with your DomaneUsername.  and this Expression can be used in textobject.

i hope, that helps

kindly Beck

swuehl
MVP
MVP

Try

=UPPER(OSUSER() )