Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Eliminate hard coding

Hi gurus

I have user I'd,name in my section access field.

I have text object in dashboard. It will display user name.

I written in text object like bellow.

If qv user =1,janson,

If qv user=2,Michele,admin.

Issue:if any user added in section access excel sheet.

If statement can't display the login user name in dashboard.

How to proceed on this situation.

Thanks in advance.

5 Replies
marcus_sommer

To display the username you didn't need any if-loop you could simply use:

= osuser() // NT-User from access point

= qvuser() // section access user - might be different if you didn't use the NT-User for the section access

- Marcus

Anonymous
Not applicable
Author

Osuser and qv user will display user IDs .am I right?

I want  to display corresponding name of the user

Thanks for your time

jagan
Luminary Alumni
Luminary Alumni

Hi,

You can simply try

OsUser() Or QVUser() functions for this, no need of if().

Regards,

Jagan.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Load one table with user master table details like below

UserID, Name

1, janson

2, Michele



Now in expression use like below

=Only({<UserID={'$(=OSUser())'}>} Name)

OR

=Only({<UserID={'$(=QVUser())'}>} Name)


Hope this helps you.


Regards,

Jagan.

jagan
Luminary Alumni
Luminary Alumni

Hi Babu,

If you got the Answer close this thread by giving Correct Answer to the helpful post.

Regards,

Jagan.