Hi Experts,
I have a customized form where I have created a range in the init method of the form to enable users to see only the records where the user's personnel number matches with the employee Id field in the table. below is the code that I have added and its works fine. Now I need to add one more range that there is a field named USERID in the table and match it with curUserId(). So the user will be able to view the records created by him and where ever his employee id is mentioned by some other user also. I hope the requirement is clear how Can I add it in the below code ?
public void init()
{
RecId EmployeeId;
HcmWorker _hcmWorker;
super();
EmployeeId = DirPersonUser::findUserWorkerReference();
select _hcmWorker where _hcmWorker.RecId == EmployeeId;
MyTable_Ds.query().dataSourceTable(Tablenum( MyTable)).addRange(fieldNum( MyTable,EmployeeId)).
value(SysQuery::value(_hcmWorker.PersonnelNumber));
}