Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
racer25
Contributor III
Contributor III

Hide List Box Based on User

Hi Everyone.

Please forgive me if I have not searched very well for this. I found lots of complex challenges with complex solutions and I believe what I am doing is far more simple ( I hope ).

I have granted access to a Qlikview Document through section access based on NT logon - so essentially no username and passwords required by the end user. For admin/testing purposes only I have a list box where I can click on a username and see their effective access (which teams etc). All this works well and 100+ users are happy.

What I would like to be able to do is make the aforementioned ListBox visible to 3 people ( me and two admin ). I have not done this before so would appreciate the full hand hold 🙂

Looking for simple I hope (If user = jsmith1 or user =admin1 or user = admin2 then visible)

Many thanks,

Rob

4 Replies
maxgro
MVP
MVP

you can use the OSUser function to check the user in layout tab of the listbox, show conditional

this is from QlikView help

OSuser( )

Returns a string containing the name of the current user as returned by the operating system.

racer25
Contributor III
Contributor III
Author

Hi Massimo,

I tested OSUser() but not sure how I would allow 3 users to see the listbox.

Can you elaborate a little please?

Thanks,

Rob

maxgro
MVP
MVP

=mixmatch(OSUser(), 'domain\user1', 'domain\user2', 'domain\user3')

from QlikView help

mixmatch( str, expr1 [ , expr2,...exprN ] )

The mixmatch function performs a case insensitive comparison.

Example:

mixmatch( M, 'Jan','Feb','Mar')

returns 1 if M = jan


if OsUser() is one of the 3 users, the expression returns a positive integer --> listbox is visible

if not, the expression returns 0 --> listbox not visible



you can also use the expression you already posted

=if(OsUser() = '.......' or OsUser()= '......' or OsUser() = '.....', 1, 0)


Not applicable

Please try this, if you think this is simple to follow.

Add one more new column in section access file, which takes value (1 or 0).

1 - for user, whom you want to display list box.

0 - for others.

Example: I have added Export as new column which takes binary value.

LOAD ACCESS,

     NTNAME,

     EXPORT

FROM

[$(vDOCPath)\Tab_Access.xlsx]

(ooxml, embedded labels, table is Access);

Access table

  

ACCESSNTNAMEEXPORT
ADMINQlikView Admin1
USERa1
USERb1
USERc0

Use the binary column in show condition (Here it is sheet property. You can do same for other objects also)

Thanks,

Vinod Kumar V