Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
petter
Partner - Champion III
Partner - Champion III

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.

View solution in original post

15 Replies
danieloberbilli
Specialist II
Specialist II

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
Author

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
Specialist II
Specialist II

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
Author

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
Specialist II
Specialist II

log in as

user a      --> shows listbox with AccountID

user b     --> no AccountID listbox

log in as admin for full rights

petter
Partner - Champion III
Partner - Champion III

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.

petter
Partner - Champion III
Partner - Champion III

$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.

petter
Partner - Champion III
Partner - Champion III

2015-05-08 #1.PNG

Not applicable
Author

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.