Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing OSUSER and user_name

Hi All,

OSUSER is happiest\keerthi and i have a field called user_name.

User_name has many names such as keerthi, Anil without the domain.

When i click on a button, it should compare OSUSER with the user_name. If user_name matches  then particular user_name should be selected.

Please help me with this. i don't know how to check between OSUSER and user_name because of the domain.

Please reply ASAP.

Thanks & Redards,

Keerthi

1 Solution

Accepted Solutions
maxgro
MVP
MVP

to extract the user from osuser() you can try this

Right(OSUser(), len(OSUser()) - index(OSUser(), '\'))

in a button

select in field

field =

user

search string =

=Right(OSUser(), len(OSUser()) - index(OSUser(), '\'))

View solution in original post

4 Replies
maxgro
MVP
MVP

to extract the user from osuser() you can try this

Right(OSUser(), len(OSUser()) - index(OSUser(), '\'))

in a button

select in field

field =

user

search string =

=Right(OSUser(), len(OSUser()) - index(OSUser(), '\'))

swuehl
MVP
MVP

You can extract the user name only using

=subfield(OSUser(),'\',2)

and you try using this expression as search string in a select in field button action (for selection in field user_name).

Not applicable
Author

Thanks Massimo

Not applicable
Author

Thanks Swuehl