Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
dseelam
Creator II
Creator II

Help with conditional show of a test object

hello all,

How to conditionally show text object to only 3 osusers just say tom, frank & eli

and hide it from other users ??

1 Solution

Accepted Solutions
sunny_talwar

I think OSUser() outputs more than just the user_name. It adds the domain name also. So, I would suggest using WildMatch(), SubStringCount() or Index() functions instead of using Match

=WildMatch(OSUser(), '*tom_username', '*frank_username',....)

or extract the user_name from OSUser and then use it with Match

=Match(Subfield(OSUser(), '\', 2), 'tom_username', 'frank_username', 'eli_username')

View solution in original post

10 Replies
Nicole-Smith

Put the following in Layout > Show > Conditional:

=match(OSUser(), 'tom_username', 'frank_username', 'eli_username')

dseelam
Creator II
Creator II
Author

Hello Nicole,

Thanks for the reply

When I use condition above, some how its hidden from my screen even I did added my self in condition

Its not working

sunny_talwar

I think OSUser() outputs more than just the user_name. It adds the domain name also. So, I would suggest using WildMatch(), SubStringCount() or Index() functions instead of using Match

=WildMatch(OSUser(), '*tom_username', '*frank_username',....)

or extract the user_name from OSUser and then use it with Match

=Match(Subfield(OSUser(), '\', 2), 'tom_username', 'frank_username', 'eli_username')

swuehl
MVP
MVP

Check with a text box object what is returned for OSUser().

Also double check the spelling of your user name in the match() function, AFAIR, it's case sensitive.

johnca
Specialist
Specialist

I think your usernames need to be fully qualified including the domain with the domain capitalized, so modify Nicole's reply to:

=match(OSUser(), 'ABC_CO\tom_username', 'ABC_CO\frank_username', 'ABC_CO\eli_username').


HTH,

John

dseelam
Creator II
Creator II
Author

Hey Sunny,

this expression worked for KPI

=WildMatch(OSUser(), '*tom_username', '*frank_username',....)


can I hide the same KPI as expression in straight table using same kind of condition ??


my expression is in variable (vShipcurrentOnTimeAmtPct)

sunny_talwar

I think you should be able to do that, is it not working?

dseelam
Creator II
Creator II
Author

On text object its working as it has conditional show and hide

how to use same condition in straight table only  for one field to show for only OSUSERS ?

sunny_talwar

Both dimensions and expressions have conditional show hide. Use them....

Dimension

Capture.PNG

Expressions

Capture.PNG