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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
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
Partner - Champion III
Partner - Champion III

Hi,

You can simply try

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

Regards,

Jagan.

jagan
Partner - Champion III
Partner - Champion III

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
Partner - Champion III
Partner - Champion III

Hi Babu,

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

Regards,

Jagan.