i want to filter mutilselct lookup based on Employment type
For an instance we have labors and staff
on init method i have written this code
Query query = new Query(queryStr(HcmWorkerListPage_Employees));
QueryBuildDataSource qbds;
super();
query.clearAllFields();
qbds=query.dataSourceTable(tableNum(HcmWorker));
qbds.fields().addField(fieldNum(HcmWorker,PersonnelNumber));
qbds.fields().addField(fieldNum(HcmWorker,Person));
msCtrlCust = SysLookupMultiSelectCtrl::constructWithQuery(element, MultiLookup, query);
its working fine
now on modified method of combox
boolean ret;
ret = super();
if (str2int( this.valueStr())==EmployeeTypeLeave::Staff)
{
element.changeWorkerLookup("HcmWorkerListPage_Employees");
}
else if (str2int( this.valueStr())==EmployeeTypeLeave::Labor)
{
element.changeWorkerLookup("HcmWorkerListPage_Labors");
}
return ret;
now
what code do i need to write on changeWorkerLookup method since i already construct lookup?
can i reinitialize the whole control? (that also can work for me)
i cannot use refreshQueryRun coz getting error wrong argument type for function.
*This post is locked for comments