Monday, September 20, 2010

Hide a Row in a Grid or Scroll Area Using PeopleCode


Here I am taking standard address page as example.Address page has a gird with 2 rows, one of Address Type "Home" and the other with Address Type "Mailing". I would like to hide rows on the grid that have anything other than Address Type "Home": Now what I would like to accomplish is this: And now the code on how to go about doing this:
Local Rowset &Level1;
&Level1 = GetLevel0()(1).GetRowset(Scroll.PERSON_ADDRESS);
For &i = 1 To &Level1.ActiveRowCount
&AddrType = FetchValue(Scroll.PERSON_ADDRESS, &i, PERSON_ADDRESS.ADDRESS_TYPE);
If &AddrType <> "HOME" Then
&Level1(&i).Visible = False;
End-If;
End-For;

No comments:

Post a Comment