Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

fransnylin
New Contributor

Filtering data – Access rights?

Hi all,

I would like to know the best way of filtering data in an application based user ID.

In my case I some users that should be filtered and the rest should see all. The users being filtered aren’t that many (5-15) and they don’t change often (but our ‘see all’ users change more often). I also have a table with Userid that I can use for filtering, so they should only see data related to their Userid.

I understand that one option is section access. Is this the best option, or are there others?

Do I need to script and where do I place the script?

I would really appreciate an example.

Thanks

Frans

Tags (2)
4 Replies
ogster1974
Honored Contributor II

Re: Filtering data – Access rights?

This should get you started.

Section Access

fransnylin
New Contributor

Re: Filtering data – Access rights?

Thanks!

I managed to get it working, and then it stopped whilst i was testing it our - so it stopped working - have I done a basic error or is there anything i am missing?

What i am trying to do is quite basic. A user should only be able to see records related to their CLIENT_ID.

section access;

LOAD * INLINE [

ACCESS,USERID, CLIENT_ID

ADMIN,DOMAIN\QVADMIN,*

ADMIN,INTERNAL\SA_SCHEDULER,*

USER,DOMAIN\FL,'FL'

USER,DOMAIN\CI,'CI'

USER,DOMAIN\LD,'LD'

USER,DOMAIN\PWLD,'PWLD'

USER,DOMAIN\PL,'PL'

];

section application;

Thanks

Frans

mark6505
Valued Contributor III

Re: Filtering data – Access rights?

Hi Frans

As Andy has provided Section access is your best bet and what it is designed to do.

You could probably achevied something with Set Analysis and IF Statements, Checking that that UserID = OSuser(), but would probably be long winded and more work.

Mark

maxsheva
Contributor

Re: Filtering data – Access rights?

Hi, please use NTNAME instead USERID as well as check whether CLIENT_ID field name is uppercase in source table.