Wednesday, March 4, 2020

call table level lookup method in form

EmplTable-->Method
 public client static void lookupActiveEmpId(FormStringControl _ctrl)
{
    SysTableLookup          sysTableLookup =      SysTableLookup::newParameters(tableNum(EmplTable),_ctrl);
    Query                   query = new Query();
    QueryBuildDataSource    queryBuildDataSource = query.addDataSource(tableNum(EmplTable));

    queryBuildDataSource.addRange(fieldNum(EmplTable,Active)).value(enum2str(NoYes::Yes));
    sysTableLookup.addLookupfield(fieldNum(EmplTable,EmplId));
    sysTableLookup.addLookupfield(fieldNum(EmplTable, EmplName));
    sysTableLookup.addLookupfield(fieldNum(EmplTable,Active));
    sysTableLookup.addSelectionField(fieldNum(EmplTable,EmplId));

    sysTableLookup.parmQuery(query);
    sysTableLookup.performFormLookup();
}
Form-->Design String Control-->method

public void lookup()
{   
    EmplTable::lookupActiveEmpId(this);
}

update_recordset with joins

 update_recordset with joins update_recordSet storeTransfer         setting      TransactionId = transfertable.TransferId     join transfert...