public void lookup()
{
Query query = new Query();
QueryBuildDataSource qbds;
SysTableLookup sysTableLookup;
sysTableLookup = sysTableLookup::newParameters(tableNum(OMOperatingUnit),this);
sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit,OMOperatingUnitNumber));
sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit,Name));
sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit,OMOperatingUnitType));
sysTableLookup.addSelectionField(fieldNum(OMOperatingUnit,Name));
qbds = query.addDataSource(tableNum(OMOperatingUnit));
qbds.addSortField(fieldNum(OMOperatingUnit,OMOperatingUnitNumber));
qbds.addRange(fieldNum(OMOperatingUnit,OMOperatingUnitType)).value(enum2str(OMOperatingUnitType::OMDepartment));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
{
Query query = new Query();
QueryBuildDataSource qbds;
SysTableLookup sysTableLookup;
sysTableLookup = sysTableLookup::newParameters(tableNum(OMOperatingUnit),this);
sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit,OMOperatingUnitNumber));
sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit,Name));
sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit,OMOperatingUnitType));
sysTableLookup.addSelectionField(fieldNum(OMOperatingUnit,Name));
qbds = query.addDataSource(tableNum(OMOperatingUnit));
qbds.addSortField(fieldNum(OMOperatingUnit,OMOperatingUnitNumber));
qbds.addRange(fieldNum(OMOperatingUnit,OMOperatingUnitType)).value(enum2str(OMOperatingUnitType::OMDepartment));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
No comments:
Post a Comment