Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Text box based on OSUser()

I have a USER table in QlikView with a list of QlikView users who could potentially log in. I want to create a text box with the last name of the user who has logged into QlikView.

One of the fields is USERNAME which is essentially the OSUser() name.

For example if I log in the OSUser() name is "DH\SCAT" and in the USERS table there is a match on USERNAME I want to pull back the LASTNAME field. So...

If OSUser()=DH\SCAT and USERNAME=DH\SCAT then the text box should show the LASTNAME field of "CAT".

Thanks in advance.

1 Solution

Accepted Solutions
Not applicable

Hi,

You can try something like that:

=Only({$<username = {'$(=OSUser())'}>} lastname)

View solution in original post

3 Replies
Not applicable

Would parsing out the lastname from OSUser() work? If that's the case, you can try something like this:

SubField(OSUser(), '\', 2)

Not applicable

Does your USER table have last name as a column? if yes, then use a if statement?

Not applicable

Hi,

You can try something like that:

=Only({$<username = {'$(=OSUser())'}>} lastname)