How to Use scrollselect in Peoplecode
You can use scrollselect and scrollflush peoplecode function fro populate data in grid and scroll area for each requirements
For Example 1 :
Local Rowset &rs1_1, &rs1_2;
&rs1_1 = GetRowset(Scroll.TEST1_TBL);
&rs1_1.Flush();
&rs1_1.Select(Record.TEST1_TBL, “where EMPLID = :1 and EFFDT = :2 order by To_Number(EMPLID ) “, &EMPLID , &EFFDT);&rs1_2 = GetRowset(Scroll.TEST2_TBL);
&rs1_2.Flush();
&rs1_2.Select(Record.TEST2_TBL, “where EMPLID = :1 “, &Emplid);/*– You can Sort Effdt in Scroll Area –*/
SortScroll(1, Record.TEST1_TBL, TEST1_TBL.EFFDT, “A”);/*– Hide Row of TEST1_TBL–*/
Local Rowset &VET_SCROLL, &OWNER_SCROLL, &PET_SCROLL, &VISIT_SCROLL;
/*Get level 0 Rowset*/
&VET_SCROLL = GetLevel0();/*Now get level 1*/
&OWNER_SCROLL = &VET_SCROLL.GetRow(1).GetRowset(Scroll.TEST2_TBL);/* The way to read this is at level 0 row 1 get the Rowset for the SCROLL OWNER and call it &OWNER_SCROLL. Now lets get level 2 at row number = 5 and hide this row of level2 */
&PET_SCROLL = &OWNER_SCROLL.GetRow(5).GetRowset(Scroll.TEST2_2_TBL);
&PET_SCROLL.HideAllRows();
For Example 2 :
Scrollflush(Scroll.TEST1_TBL)
/* Populate Data of Grid Level 1*/
Scrollselect(1,Record.TEST1_TBL,Record.TEST1_TBL,”where EMPLID = :1 and EFFDT = :2 order by To_Number(EMPLID ) “, &EMPLID , &EFFDT);Scrollflush(Scroll.TEST2_TBL)
/* Populate Data of Grid Level 1*/
Scrollselect(1,Record.TEST2_TBL,Record.TEST2_TBL,”where EMPLID = :1 “, &Emplid);