Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
mrbqlik2009
New Contributor III

Filter Listbox By QVUSER()

Hi,

I have listbox with some value for example test1, test2, test3, test4, test5.

I want when user1 login to system, listbox show just value test1 and test2.

I write this:

=if(Upper(bLogin) = 'USER1',SaleTypeTitle={'test1', 'test2'})

but not work.

Tags (2)
6 Replies
Highlighted
qlikmeplease
Contributor III

Re: Filter Listbox By QVUSER()

I would recommend using section access instead.

Create a USER as USER1 and the SaleTypeTitle to be the field used to filter, remember to create two lines for user 1.

See below example:

Access,  UserID,  SaleTypeTitle

USER,  USER1,  test1, 

USER,  USER1,  test2, 



mrbqlik2009
New Contributor III

Re: Filter Listbox By QVUSER()

Thank you.

but can i do that by write expression in listbox?

Highlighted
qlikmeplease
Contributor III

Re: Filter Listbox By QVUSER()

No this will require section access to be applied in the script.

Highlighted
MVP
MVP

Re: Filter Listbox By QVUSER()

If you are looking to restrict the display in listbox (and not really data security is an issue), you may try like:

=if(Upper(bLogin) = 'USER1',

          If(Match(SaleTypeTitle,'test1', 'test2') ,SaleTypeTitle),

SaleTypeTitle)

Highlighted
YoussefBelloum
Esteemed Contributor

Re: Filter Listbox By QVUSER()

Hi,

try with the OSUSER() function

try first osuser() on a textbox, get the exact value and try this:

=if(OSUSER()= 'the value you got', if(match(SaleTypeTitle,'test1','test2',SaleTypeTitle))

Highlighted
mrbqlik2009
New Contributor III

Re: Filter Listbox By QVUSER()

Thanks. I use this expression but in listbox show test1, test2, test3, test4,test5.

I want just show test1 and test2.

i should say value of listbox fetch from database.