The form you have posted looks to be the HcmWorkerLookup. I would suggest you not duplicate the lookup form. Override the lookup for the field on your form datasource to use one of the predefined static methods. HcmWorkerLookup::newActiveWorkers(), .... You should be able to filter the data to meet your requirements. Otherwise you need to deal with date effectively and current LE of the worker which is not a trivial task to get correct.
↧