public void lookup(FormControl _formControl, str _filterStr)
{
SysTableLookup sysTableLookup; // systemclass to create //customlookup
Query query;
QueryBuildDataSource qbd;
;
sysTableLookup = SysTableLookup::newParameters(tablenum
(SalesTable),_formcontrol);
// Construct query on the table,
// whose records you want to show as lookup.
query = new Query();
qbd = query.addDataSource(tablenum(SalesTable));
//qbd.addRange(fieldnum(TableName,FieldName of table))
//.value(SysQuery::value(enum2str(BaseEnumName::Field of BaseEnum)));
//qbd.addRange(fieldnum(SalesTable,SalesStatus)).value(SysQuery::value(enum2str
//(SalesStatus::Backorder)));
// add the fields to the lookup list
sysTableLookup.addLookupfield(fieldnum(SalesTable,SalesId));
sysTableLookup.addLookupfield(fieldnum(SalesTable,SalesStatus));
// pass the query as parameter
// system will show the records in the lookup
// as per your query
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
{
SysTableLookup sysTableLookup; // systemclass to create //customlookup
Query query;
QueryBuildDataSource qbd;
;
sysTableLookup = SysTableLookup::newParameters(tablenum
(SalesTable),_formcontrol);
// Construct query on the table,
// whose records you want to show as lookup.
query = new Query();
qbd = query.addDataSource(tablenum(SalesTable));
//qbd.addRange(fieldnum(TableName,FieldName of table))
//.value(SysQuery::value(enum2str(BaseEnumName::Field of BaseEnum)));
//qbd.addRange(fieldnum(SalesTable,SalesStatus)).value(SysQuery::value(enum2str
//(SalesStatus::Backorder)));
// add the fields to the lookup list
sysTableLookup.addLookupfield(fieldnum(SalesTable,SalesId));
sysTableLookup.addLookupfield(fieldnum(SalesTable,SalesStatus));
// pass the query as parameter
// system will show the records in the lookup
// as per your query
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
No comments:
Post a Comment