Generic Scroll PeopleCode

Your rating: None Average: 3.5 (2 votes)

We always find it confusing to write code for Scrolls. Following is generic peoplecode which you can use for pages having parent child relationships (scrolls).

Just replace the record and field for respective level.

&rs_level0 = GetLevel0();

&level0fieldvalue = &rs_level0.(1).Level0_Record.Level0_field.Value ;

&row_level0 = &rs_level0.GetRow(1);
&rs_level1 = &row_level0.GetRowset(Scroll.Level1_Record);
For &J = 1 To &rs_level1.RowCount

   &level1fieldvalue = &rs_level1.GetRow(&J).Level1_Record.Level1_field.Value
   
   &row_level1 = &rs_level1.GetRow(&J);
   &rs_level2 = &row_level1.GetRowset(Scroll.Level2_Record);
   
    For &L = 1 To &rs_level2.RowCount
    &level2fieldvalue = &rs_level2.GetRow(&L).Level2_Record.Level2_field.Value
    End-For;
   
End-For;

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.
Guest's picture
Guest (not verified)
Re: Generic Scroll PeopleCode

extremely helpful!

sudheer's picture
sudheer (not verified)
Re: Generic Scroll PeopleCode

Thanks....

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.