Lookup with range:
public void
lookup()
{
QueryBuildDataSource queryBuildDataSource;
SysTableLookup lookup;
QueryBuildRange queryBuildRange;
Query query;
query = new Query();
//
Add the first data source to the query
queryBuildDataSource =
query.addDataSource(tableNum(DNGRSBuildingBlocks));
//
Add the range to this first data source
queryBuildRange =
queryBuildDataSource.addRange(fieldNum(DNGRSBuildingBlocks,
BuildingId));
//
Set the range
queryBuildRange.value(netfloor.BuildingId);
lookup =
SysTableLookup::newParameters(tableNum(DNGRSBuildingBlocks),
this, true);
lookup.parmQuery(query);
//
Add the fields to be shown in the lookup form.
lookup.addLookupfield(fieldNum(DNGRSBuildingBlocks, BlockID));
//lookup.addLookupfield(fieldNum(JournalizingDefinition,
JournalizingDefinitionDesc));
//lookup.addLookupfield(fieldNum(JournalizingDefinition,
JournalizingDefinitionModuleValue));
//
Perform the lookup.
lookup.performFormLookup();
}
No comments:
Post a Comment