We have some user fields in the Billing and AP modules where staff is entering numeric client ID’s for one of our divisions. Problem is we have run into a data quality issue where users are entering invalid ID’s. I want security to allow form change action only if the user field is blank or if the value in the user field matches a valid client ID.
The data entered into those user fields should match a valid client ID in a custom Lawson table we have created called SCCLIENTS2. The primary key on that custom table is an integer field called SCMID and the user fields are alphanumeric. I want to allow form change if the user field value matches one of the SCMID values. I am getting security violations and wonder if it has something to do with the integer in the custom table comparing to the alpha user field. I have tried trim(), lztrim() and strToNum() with no success. Any ideas?
Here’s the rule I currently have written on form BL20.4:
if(form.OIL_USER_FLD3==''||(strToNum(form.OIL_USER_FLD3)==trim(getDBField('SCCLIENTS2','SCMID',form.OIL_USER_FLD3))
'ALL_ACCESS,'
else
'NO_ACCESS,'