lookup mthod with three table join ? pls give any example

lookup mthod with three table join ? pls give any example

Parents
No Data
Reply
  • prashant said:

    lookup mthod with three table join ? pls give any example

     

    public void lookup()

    {

        SysTableLookup          sysTableLookup = SysTableLookup::newParameters(tablenum(WorkSubCategories), this);

        Query                   q = new Query();

        QuerybuildDatasource    qbd, qbd1, qbd2;

        ;

        super();

     

        qbd = q.addDataSource(tablenum(WorkSubCategories));

     

     

        qbd1 = qbd.addDataSource(tablenum(WorkPlanningProductCategory));

        qbd1.addLink(fieldNum(WorkSubCategories, WorkSubCategory), fieldNum(WorkPlanningProductCategory, WorkSubCategory));

        qbd1.joinMode(JoinMode::InnerJoin);

        qbd1.addRange(fieldNum(WorkPlanningProductCategory, PlanId)).value(queryValue(purchreqtable.PlanId));

     

    qbd2 = qbd1.addDataSource(tablenum(WorkPlanningProductCategory_1));

        qbd2.addLink(fieldNum(WorkPlanningProductCategory, WorkSubCategory), fieldNum(WorkPlanningProductCategory_1, WorkSubCategory));

        qbd2.joinMode(JoinMode::InnerJoin);

        qbd2.addRange(fieldNum(WorkPlanningProductCategory_1, PlanId)).value(queryValue(purchreqtable.PlanId));

     

     

     

        sysTableLookup.addLookupfield(fieldnum(WorkSubCategories, WorkSubCategory));

        sysTableLookup.addLookupfield(fieldnum(WorkSubCategories, Description));

     

        sysTableLookup.parmQuery(q);

        sysTableLookup.performFormLookup();

    }

     

Children
No Data
Related
Recommended