Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

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
Honored Contributor II

Re: Hide listbox based on Section Access

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

6 Replies
vgutkovsky
Honored Contributor II

Re: Hide listbox based on Section Access

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

Re: Hide listbox based on Section Access

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

vgutkovsky
Honored Contributor II

Re: Hide listbox based on Section Access

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

Re: Hide listbox based on Section Access

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
Honored Contributor II

Re: Hide listbox based on Section Access

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

Employee
Employee

Re: Hide listbox based on Section Access

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

Community Browser