[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Row Level Security



Http://peoplesoft.ittoolbox.com/groups is where you'd get into a directly 
relevant discussion group. But while I'm here, I did this about a year ago. The 
following works on my laptop... 

If we take the example of a panel field which will return the ROLEUSER of an 
operator's ROWSECLASS, you can jazz it up from there, because you're 
controlling what the ROLEUSER field returns based on the ROWSECCLASS, which I 
think is 
what you're after.

You do a table with the fields OPRID, ROWSECCLASS and ROLEUSER. All are key 
fields and the last two are list box items (some of this may be superfluous, 
but I'm going to bed soon). You prompt the ROLEUSER field on a view containing, 
again, the fields OPRID, ROWSECCLASS and ROLEUSER, all of which must be key 
fields and list box items for the magic to work. The view definition is
SELECT DISTINCT A.OPRID 
, A.ROWSECCLASS 
, c.roleuser 
FROM PSOPRDEFN A 
, psroleclass b 
, psrolemember c 
WHERE A.ROWSECCLASS=B.classid 
AND b.rolename=c.rolename

On your panel you have fields for OPRID and ROWSECCLASS which will be 
read-only. OPRID can be populated with %operatorid in PeopleCode on RowDefault, 
and 
ROWSECCLASS can be populated by making it PSOPRDEFN.ROWSECCLASS, a related 
display field related to OPRID, whatever record OPRID comes from.

If ROLEUSER is put onto the panel as an edit box, it will become a drop-down 
list, returning only the ROLEUSERs for this ROWSECCLASS/CLASSID as set down in 
PSROLEMEMBER.

There may well be a quicker way of doing this but at least it works. I also 
do Excel VB, MS Access, bar mitzvahs and weddings. Don't suppose you know 
anything about SQR copy-protection?

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users