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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
danm84306
Contributor III
Contributor III

Look up OSUser() from list and return value

Hello,

            I am looking for the proper expression to look up the OSUser() value from a table list to return the proper
name value. For example, if the OSUser()= ADMIN\frizzo the expression would return the value "Frank" from the table.

Table

ADMIN\frizzo, Frank

1 Solution

Accepted Solutions
danm84306
Contributor III
Contributor III
Author

Worked like a charm! Thank you!

View solution in original post

4 Replies
evan_kurowski
Specialist
Specialist

If your two column table above had the field names:

NTName, Name

ADMIN\frizzo, Frank

You could enter this expression in a text box to return Frank:
=Only({<NTName={$(=OSUser())}>} Name)

danm84306
Contributor III
Contributor III
Author

Worked like a charm! Thank you!

Not applicable

You can use wildmatch. Lets say your table is like below:

Table:

Col1,  Col2

CompanyName\C8724, Frank

CompanyName\C9823, Mary

Then on the front end you can just create a straight table

Dim: Col2

Exp: If( Wildmatch(Upper(Col1),OSUser()),Col2)

Then you can hide the expression in Presentation tab

evan_kurowski
Specialist
Specialist

Dan McDonald wrote:

Worked like a charm! Thank you!

Haha!  You are correct sir.