I am trying to get a condition to work within one of my security classes on a few PR batch programs. I am using PR270 for testing and the condition looks like this:
if((((trim(getDBField('EMPLOYEE','PROCESS-LEVEL',form.COMPANY,form.FR_EMPLOYEE,form.TO_EMPLOYEE))=='XXXX'))||(form.PROCESS_LEVEL=='XXXX')))
'ALL_ACCESS,'
else
if((((trim(getDBField('EMPLOYEE','PROCESS-LEVEL',form.COMPANY,form.FR_EMPLOYEE,form.TO_EMPLOYEE))=='YYYY'))||(form.PROCESS_LEVEL=='YYYY')))
'ALL_ACCESS,'
else
'NO_ACCESS,'
(Obviously, I have replaced the PROCESS-LEVEL values with XXXX and YYYY.)
When I try saving the job with PROCESS-LEVEL values of XXXX or YYYY, it works fine. When I change it to one that is not XXXX or YYYY, I get a security violation. This is what I want.
However, if I use any EMPLOYEE renage (FR_EMPLOYEE - TO_EMPLOYEE), it allows me to do so. I want it to give a security violation if it is an employee that is assigned to these particular process levels.
Thanks!