Qlik Community

QlikView Security & Governance

Discussion Board for collaboration on QlikView Security and Governance.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Want to Hide List box when Field used in it is OMITed for few users.

Hi Guys,

I have application where have Field AccountID. This AccountID is having OMIT in section Access for few of the users.

and in application we have used AccountID in list box.

So suppose for User A OMIT is not applicable so he should see list box in application but for User B AccountID is MOIT and then AccountID is hidden for him in application. When User B is log in he is not seeing any AccountID values but empty list box is still displaying.

What I want that for User B list box also should be hidden. So show the list Box Account ID to those users for whom AccountID is not OMIT and hide for those users for whom AccountId OMIT is applicable.

How can I do this in list box.?

Section Access is working fine. 

1 Solution

Accepted Solutions
MVP
MVP

Re: Want to Hide List box when Field used in it is OMITed for few users.

A simple expression you could use to test whether a field exists at all is this:

=Count( {<$Field={aFieldName}>} $Field)=1

Which you could use as the expression in Show Conditional for the List Box.

15 Replies
danieloberbilli
Valued Contributor II

Re: Want to Hide List box when Field used in it is OMITed for few users.

Not sure if you can set a condition based on the OMIT field, but as a workaround you could use exactly the same concept as hiding sheets (pfa the document from Qlik, page 11...).

Beside of the sheet access, I always add some columns for Object access (show/hide).

Not applicable

Re: Want to Hide List box when Field used in it is OMITed for few users.

Daniel,

Thank you for sharing document which is helpful in understanding Sheeting hiding based on section access.

I am trying with condition Count(DISTINCT  [AccountID ])>0 adding in Layout-->Show-->Condition

but when I log in with user B, It is displaying X symbol Under General-->Field of list box with message  AccountID (unavailable)

Guys, I hope there should some simple method to hide this.

Please suggest.

danieloberbilli
Valued Contributor II

Re: Want to Hide List box when Field used in it is OMITed for few users.

If AccountID is not available (due to OMIT) then you cant use it in a condition as Qlik cannot compute your expression with an unknown field. But if you use the technique and the expression like described in SheetAccess it shouldnt be any problem (e.g. have a column called ObjectAccountID with a 0 for User B and use the expression sum(ObjectAccountID)>=1) in the listbox/object

Not applicable

Re: Want to Hide List box when Field used in it is OMITed for few users.

Daniel,

Is that possible for you to provide a sample qvw for hiding sheet. I am trying on mine but it is not working.

If you don't have I will create a sample one and share with you.

danieloberbilli
Valued Contributor II

Re: Want to Hide List box when Field used in it is OMITed for few users.

log in as

user a      --> shows listbox with AccountID

user b     --> no AccountID listbox

log in as admin for full rights

MVP
MVP

Re: Want to Hide List box when Field used in it is OMITed for few users.

A simple expression you could use to test whether a field exists at all is this:

=Count( {<$Field={aFieldName}>} $Field)=1

Which you could use as the expression in Show Conditional for the List Box.

MVP
MVP

Re: Want to Hide List box when Field used in it is OMITed for few users.

$Field is one of the standard meta-fields of any QlikView application. It simply contains a list of all fields in your running application. QlikView populates these meta-fields while running the load script or any time the data model changes.

They are referred to as System Fields too.

MVP
MVP

Re: Want to Hide List box when Field used in it is OMITed for few users.

2015-05-08 #1.PNG

Not applicable

Re: Want to Hide List box when Field used in it is OMITed for few users.

Hi Petter,

What you have suggested (Count( {<$Field={aFieldName}>} $Field)=1) is working perfectly when hiding a list box when field used in it is OMIT.

I am facing issue in hiding sheet. It is not working for my application. Please somebody look into it and let me know what wrong I have done here?

Please find attached Qvw and Excel.

Community Browser