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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional Show Sheet Not Equal Syntax

In the sheet properties, I am trying to set the Show Sheet/Conditional feature to prevent select users from viewing the sheet based on an expression.  But my syntax is incorrect.

I know how to enable select users to view a sheet through sheet properties, using syntax such as this:

OSUser()= 'usernamehere'.

However, I'm trying to do the inverse - disable select users from viewing the sheet. 

I've tried using the following the syntax combinations:

OSUser() <> 'usernamehere'

OSUser() -=  'usernamehere'

Neither of my not-equal expressions works.  Would anyone know of a solution?

Other notes:

Under Settings/Document Properties/Security, I have the 'Show All Sheets and Objects' box not checked.

Under Settings/Document Properties/Sheets, the sheet I'm trying to hide has a status of Conditional: Normal.

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this

=Not(Match(OSUser(), 'username1', 'username2'))

Regards,

Jagan.

View solution in original post

7 Replies
Nicole-Smith

What about:

if(OSUser()= 'usernamehere', 0, 1)

Not applicable
Author

Thanks, Nichole.  I tried that approach, but my test user can still view the tab even with the following restriction.

if(OSUser()= 'usernamehere', 0, 1)

I keep wondering if there is a conflict with the Document Property Settings, but I don't see anything obvious.

Not applicable
Author

Thanks, Nichole.  I tried that approach, but my test user can still view the tab even with the following restriction.

if(OSUser()= 'usernamehere', 0, 1)

I keep wondering if there is a conflict with the Document Property Settings, but I don't see anything obvious.

Not applicable
Author

Try

Not(osuser()='username')

Not applicable
Author

Nigel, your proposal worked when I was trying to exclude a single user.  But I have multiple users to exclude.  Would you know the correct syntax when I'm excluding multiple users?

WORKS FOR SINGLE USER:

Not(OSUser()= 'username1'

FAILS FOR MULTIPLE USERS:

Not(OSUser()= 'username1' OR

Not(OSUser()= 'username2'

ALSO FAILED with this syntax:

Not(OSUser()= 'username1', 'username2')

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this

=Not(Match(OSUser(), 'username1', 'username2'))

Regards,

Jagan.

Not applicable
Author

This solution works.  I'm testing it under some other circumstances.  Thanks for everyone's input.