LookUp for a string field
Override the LookUp method in Form DS or Form design
public void lookup(FormControl _formControl, str _filterStr)
{
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(CEMContinuingEducation), _formControl);
sysTableLookup.addLookupField(fieldNum(CEMContinuingEducation, CEMEducationType));
sysTableLookup.addLookupField(fieldNum(CEMContinuingEducation, ContEducationCategoryId));
queryBuildDataSource = query.addDataSource(tableNum(CEMContinuingEducation));
queryBuildRange = queryBuildDataSource.addRange(fieldNum(CEMContinuingEducation, ContEducationCategoryId));
queryBuildRange.value(CEMPersonContinuingEducation.ContEducationCategoryId);
queryBuildDataSource.addSelectionField(fieldNum(CEMContinuingEducation, CEMEducationType));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
//super(_formControl, _filterStr);
}
No comments:
Post a Comment