How to Access a field in level 2 grid in a page using people code

If you have a page which has level 0 record and a level 1 scroll area .The level 1 scroll area has level 1 and level 2 grids in it, to access a field in the level 2 grid, you need to access the level 1 grid first and then only the level 2 grid field can be accessed, since the level 2 grid cannot be accessed directly . It cannot be accessed even through the scroll area since the whole scroll act as a row and for a level 0 parent row, there can be any number of scroll level data.
/*level 1 scroll : SCROLL_1 (Page field name)

level 1 record : REC_LEVEL1

level 2 record : REC_LEVEL2
*/

local rowset &Rs1, &Rs2;

&Rs1 = GetLevel0()(1).GetRowset(Scroll.REC_LEVEL1);

For &i = 1 To &Rs1.ActiveRowCount
   &Rs2 = &Rs1.GetRow(&i).GetRowset(Scroll.REC_LEVEL2);
   For &j = 1 To &Rs2.ActiveRowCount
    
         &Rs2(&j).ANY_RECORD_IN_LEVEL2.CORRESPONDING_FIELD.Value = *****

****************************
/*DO THE REQUIRED PROCESSING */
****************************

    End-For;
End-For;
SHARE

peoplesoft

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Phaniraavi@gmail.com