Qlik Community

New to Qlik Community

Discussion board for questions on how to use Qlik Community and its features.

Announcements
This forum is for questions and information about how to use the Qlik Community.
Please do not post product related questions here.
Select the correct forum from: Qlik Product Forums
danm84306
New 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
New Contributor III

Re: Look up OSUser() from list and return value

Worked like a charm! Thank you!

4 Replies
evan_kurowski
Valued Contributor

Re: Look up OSUser() from list and return value

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
New Contributor III

Re: Look up OSUser() from list and return value

Worked like a charm! Thank you!

Not applicable

Re: Look up OSUser() from list and return value

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
Valued Contributor

Re: Look up OSUser() from list and return value

Dan McDonald wrote:

Worked like a charm! Thank you!

Haha!  You are correct sir.

Community Browser