Filter by field option

Hi,

In the project module for the project details form, i have a customized a field called responsible manager where it has the drop down of Employee id and Employee name form employee master. In the dropdown Employee id is occuring with the filter by field options but Employee name doesnt occurs with the filter option. Please let me know how to add the fileter by field options on the Employee name also .

Thanks…

Employee Name is a display method which fetches the name from DirPartyTable. You cannot apply a filter on a field bounded to a display method.

Thanks for the response. But in the general journal from journals and we go into lines there is a field called Employee where the employee id and employee name has separate filter options…Is there any difference between that and proj table emplid field?

Yes, it uses a different lookup. The lookup method has been overridden in that form.

You can use the same approach.

EmplTable::lookupEmplId(_formControl);

Hi, i placed the same method lookupEmplId in the projtable table . But its not appearing. Should i need declare this class somewhere else?

Override the look up method of the field

public void lookup(FormControl _formControl, str _filterStr)

{

;

EmplTable::lookupEmplId(_formControl);

}

this should not contain the call to super()!

Thanks …But it’s not working.Even i tried with following code:

public client static void lookupEmplId(Object _ctrl)
{
Args args;
FormRun formRun;
;

args = new Args();
args.name(formstr(EmplIdLookup));
args.caller(_ctrl);
formRun = classfactory.formRunClass(args);
formRun.init();
_ctrl.performFormLookup(formRun);
}

In the run method of EmplIDLookup Form:

u can add an additional lines

filterLookupName = SysTableLookup::filterLookupPreRun(callingControl, DirPartyTable_Name, DirPartyTable_ds);// before super

and

SysTableLookup::filterLookupPostRun(filterLookup, callingControl.text(), DirPartyTable_Name, DirPartyTable_ds); // after super

Sorry it wont workk…