Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

mrbqlik2009
New Contributor III

Hide one item of listbox for specific user

Hi,

I have listbox with 3 item 'test1', 'test2', 'test3'..

i have 2 user in section access 'user1', 'user2'.

I want when user 1 login to system see all listbox item, but when user2 login, just see 'test1' and 'test2'.

Tags (1)
1 Solution

Accepted Solutions

Re: Hide one item of listbox for specific user

In that case, you can try this

If(OSUser() = 'User2', Aggr(Only({1<item = -{'test3'}>} item), item), item)

View solution in original post

6 Replies

Re: Hide one item of listbox for specific user

May be like this

If(OSUser() = 'User2', Aggr(Only({<item = {'test1', 'test2'}>} item), item), item)

Highlighted
mrbqlik2009
New Contributor III

Re: Hide one item of listbox for specific user

Thank you. it work.

but another question. suppose we have 20 item in listbox and  we want just one item hide in listbox.

we should write 19 item in expression?

Re: Hide one item of listbox for specific user

In that case, you can try this

If(OSUser() = 'User2', Aggr(Only({1<item = -{'test3'}>} item), item), item)

View solution in original post

mrbqlik2009
New Contributor III

Re: Hide one item of listbox for specific user

this expression If(OSUser() = 'User2', Aggr(Only({1<item = -{'test3'}>} item), item), item) give error.

because that -{'test3'}.

I think "-" before {} is incorrect syntax.

Re: Hide one item of listbox for specific user

Ignore the syntax error shown by the expression editor and click ok to see if it works or not... expression editor can be misleading at times

mrbqlik2009
New Contributor III

Re: Hide one item of listbox for specific user

That's work.

Thank you.