Question : How to limit rows a user sees after logging to an APEX application

Hi,

I have a simple application built in Oracle's APEX.  There is one main table where all columns and rows are shown as a report, however I want to limit the rows each user sees.

One of the fields is the sales manager's e-mail address.  They also login using their e-mail address as their user ID.

I want to restrict the rows each user sees in this report, based on their user ID.  I want the process to take place before any data is displayed in any report, form or chart (so each user will only see the rows where they are indicated as the sales manager).  There is a parameter in APEX that can be used in a query to identify the user, but I'm not sure of the code syntax or where it would be placed.

In plain English, the query would be something like:

  Display the rows where the User ID of the logged in user equals the Managers E-mail Address of each row

Pretty simple, don't know where in the application to put this?

On the login page?
On each page of the application as a "before header" process?

Any help is appreciated.  THANKS!!

Answer : How to limit rows a user sees after logging to an APEX application

you can virtual private database for that
VPD which will mask columns for you ;and within you can use
SYS_CONTEXT(userenv, string')  which will derive all user variables for you then you can filetr them

this is a very good doc

http://homes.cerias.purdue.edu/~bhargav/cs526/VirtualPrivateDatabases.ppt
Random Solutions  
 
programming4us programming4us