public void lookup()
{
Query query;
QueryBuildDataSource qbds,qbds1;
QueryBuildRange qbr;
TableA tableA ; // the table having form where we insert the lookup values
TableB tableB ; // the table from where lookup has taken i.e "Field"
SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(tableB ), this);
query = new Query();
qbds = query.addDataSource(tableNum(tableB ));
qbds1 =qbds.addDataSource(tableNum(TableA ));
qbds1.joinMode(JoinMode::NoExistsJoin); // to negotiate the assigned elements
qbds1.relations(true);
qbr = qbds.addRange(fieldNum(tableB ,Field));
sysTableLookup.parmQuery(query);
sysTableLookup.addLookupfield(fieldNum(tableB , Field));
sysTableLookup.performFormLookup();
}
No comments:
Post a Comment