Monday, July 11, 2011

Adding table methods in the form lookup method.....

Adding the table level methods in the form lookup as the table fields...

public void lookup(FormControl _formControl, str _filterStr)
{
    SysTableLookup              sysTableLookup;
    Query                              query;
    QueryBuildDataSource    queryBuildDataSource;
    QueryBuildRange             queryBuildRange;
    ;
    sysTableLookup  = SysTableLookup::newParameters(tablenum(EmplTable), _formControl);
    sysTableLookup.addLookupfield(fieldnum(EmplTable, EmplId));
    sysTableLookup.addLookupfield(fieldnum(EmplTable, legacyEmplId));
    // adding the EmplTable method name() int he lookup methos as follows....    sysTableLookup.addLookupMethod(identifierstr(name));
    query                              =  new Query();
    queryBuildDataSource    =  query.addDataSource(tablenum(EmplTable));
  
    sysTableLookup.parmQuery(query);
    sysTableLookup.performFormLookup();
}

No comments:

Post a Comment