Hi there,
I have a requirement
I need to get employee name in my field and that field has lookup with employee name and employee id, when i select a record from that lookup then employee name has to sit in my field as value.
I have written this code and i'm getting lookup with employee id and employee name but while selecting employee id is getting in my field as value but i want employee name
My field Validation -User input - Use Drop Down from Employee Master showing Emp. Number and Name and select employee name
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(HcmWorker), sender);
Query query = new Query();
QueryBuildDataSource qbds;
QueryBuildDataSource qbdsJoin,qbdsJoin1;
qbds= query.addDataSource( tableNum(HcmWorker));
qbdsJoin= qbds.addDataSource( tableNum(DirPerson));
qbdsJoin.relations( true);
sysTableLookup.parmQuery(query);
sysTableLookup.addLookupfield( fieldNum(HcmWorker,PersonnelNumber ),true);
sysTableLookup.addLookupMethod(tableMethodStr(HcmWorker,Name));
sysTableLookup.performFormLookup();
Thank you.