Wednesday, 15 August 2018

How to get values from vo in oaf

How to get values from vo in oaf

In this post , We will discuss how to get values from vo in oaf. View object (VO) extracts the data from the database in the Oaf page and we need to read this extraction to do comparison and put conditions based on this data extraction to write our custom code. So this is quite critical we will get the values from the Vo and then do our calculations and comparisons with this data.

 Sample Code for How to get values from vo in oaf


OAViewObject SupsVO = (OAViewObject)am.findViewObject(""XXSupLovVO1"");


        if (SupsVO  != null)
        //Check for null
              SupsVO.reset();
         //It will take you to the first row of Vo


        while ( SupsVO.hasNext())
        {
        XXXRowImpl currow = (xxxVORowImpl)SupsVO .next();
        //it will return a rows in a order
        //now we can use currow.getAttributes,currow.setAttributes
         //for implementing our logic as shown below
         string firstAttr = currow.getAttribute("Attr1");

         string SecondAttr =emacurrow.getAttributes("Attr2));

        }



 

 

0 comments:

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *