Tuesday 13 May 2014

Look up







// create in Form/Fields/fields name/Methods
public void lookup(FormControl _formControl, str _filterStr)
{

    ;
    lookupMaster::lookupMasterNumber(_formControl);
}




//Create in class/ new method
public static boolean lookupMasterNumber(FormStringControl   _ctrl)

{
    SysTableLookup          sysTableLookup = SysTableLookup::newParameters(tablenum(Master1), _ctrl);
    Query                   query;
    QueryBuildDataSource    qdbsTransport;
    AvVendorRoleTable       avVendorRoleTable;
 
    ;
    //display
    sysTableLookup.addLookupfield(fieldnum(Master1, MasterNumber), true);
    sysTableLookup.addLookupfield(fieldnum(Master1, MasterID));

    //logic and assign table & field
    query           = new Query();
    qdbsTransport   = query.addDataSource(tablenum(Master1));
    qdbsTransport.addRange(fieldnum(Master1, AvStatus)).value(queryValue(Avstatus::Approve));
 

    sysTableLookup.parmQuery(query);
    sysTableLookup.performFormLookup();
    return true;
}

No comments:

Post a Comment

SQL/SSRS Interview questions I thought of blogging some SQL/SSRS interview questions.

Below are some. I will add more, when I complete the compilation 1. What is OLTP(Online Transaction Processing)? OLTP stands ...