Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
fransnylin
Contributor II
Contributor II

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

4 Replies
ogster1974
Partner - Master II
Partner - Master II

This should get you started.

Section Access

fransnylin
Contributor II
Contributor II
Author

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

Mark_Little
Luminary
Luminary

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

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