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

Hide listbox based on Section Access

Hi,

I have two user groups with separate logins to my QVW.

How can I alter the apperance of certain objects based on a users access login?

Many Thanks

1 Solution

Accepted Solutions
vgutkovsky
Master II
Master II

Just create a simple inline table with fields in all-caps like this:

myIsland:

LOAD * INLINE [

HIDEFLAG

1

0

];

Then in section access, you can have something like this for example:

NTNAME ACCESS HIDEFLAG
BOB USER 1
DAVE ADMIN 0

If you have a listbox you want to hide, under Layout make the conditional show condition max({1} HIDEFLAG)=0

Regards,

Vlad

View solution in original post

6 Replies
vgutkovsky
Master II
Master II

Brian,

The simplest way to do that would be to create an island that contains one or more flags. Add these flag values to your section access reduction fields. Then hide/show objects based on whether a flag value exists.

Regards,

Vlad

Not applicable
Author

Thanks for the help, how can I create an Island with flags?

vgutkovsky
Master II
Master II

Just create a simple inline table with fields in all-caps like this:

myIsland:

LOAD * INLINE [

HIDEFLAG

1

0

];

Then in section access, you can have something like this for example:

NTNAME ACCESS HIDEFLAG
BOB USER 1
DAVE ADMIN 0

If you have a listbox you want to hide, under Layout make the conditional show condition max({1} HIDEFLAG)=0

Regards,

Vlad

Not applicable
Author

Thats great, thank you

I have one question..

Can you explain this code - max({1} HIDEFLAG)=0

Is there another way of saying - =IF(HIDEFLAG=0, listbox.visible = False)

I know that isnt the correct code, but is there something similar?

Thanks

vgutkovsky
Master II
Master II

Well, almost. Section Access works like any other table in QlikView in terms of reductions--except that the reductions are permanent. So the section access code above will ensure that when BOB logs in, the HIDEFLAG value in the data model will only have a value of 1. Therefore, max({1} HIDEFLAG)=0 will return false and the listbox will be hidden.

Glad to help--please verify correct answers

Vlad

Bill_Britt
Former Employee
Former Employee

Like to give an example of this. The attach document has three users and based on the user it will either show or hide the SalesPerson List Box.

Dave is the Admin and will see the list box

Bob is a User and will not see the list box

Bill is a User and will see the list box.

This is based on the code that Vlad provided. The Condition to show or hide the list box is on the Layout Tab under the List Box properties.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.