public void lookup()
{
Query query = new Query();
QueryBuildDataSource qbds,qbds1;
SysTableLookup sysTableLookup;
QueryBuildRange qbr;
Parameter parameter;
//super();
sysTableLookup = SysTableLookup::newParameters(tablenum(InventTable), this);
qbds = query.addDataSource(tableNum(InventTable));
qbds1 = qbds.addDataSource(tableNum(InventItemGroupItem));
qbds1.relations(true);
qbds1.joinMode(JoinMode::InnerJoin);
select ItemGroupId from parameter;
qbr = qbds1.addRange(fieldNum(InventItemGroupItem,ItemGroupId));
qbr.value(parameter.ItemGroupId);
sysTableLookup.parmQuery(query);
sysTableLookup.addLookupfield(fieldnum(InventTable, ItemId), true);
sysTableLookup.addSelectionField(fieldNum(InventTable,Product));
sysTableLookup.addLookupMethod(tableMethodStr(InventTable,defaultProductName));
sysTableLookup.performFormLookup();
}
{
Query query = new Query();
QueryBuildDataSource qbds,qbds1;
SysTableLookup sysTableLookup;
QueryBuildRange qbr;
Parameter parameter;
//super();
sysTableLookup = SysTableLookup::newParameters(tablenum(InventTable), this);
qbds = query.addDataSource(tableNum(InventTable));
qbds1 = qbds.addDataSource(tableNum(InventItemGroupItem));
qbds1.relations(true);
qbds1.joinMode(JoinMode::InnerJoin);
select ItemGroupId from parameter;
qbr = qbds1.addRange(fieldNum(InventItemGroupItem,ItemGroupId));
qbr.value(parameter.ItemGroupId);
sysTableLookup.parmQuery(query);
sysTableLookup.addLookupfield(fieldnum(InventTable, ItemId), true);
sysTableLookup.addSelectionField(fieldNum(InventTable,Product));
sysTableLookup.addLookupMethod(tableMethodStr(InventTable,defaultProductName));
sysTableLookup.performFormLookup();
}
No comments:
Post a Comment