To custom sort a grid in PeopleSoft, use the following code:
Grid Name: Name of your main Record (Here it's PROG_TBL)
Sort: A - Ascending; D- Descending
Local Rowset &rsLevel1 = GetLevel0()(1).GetRowset(Scroll.TABLE_NAME);
&rsLevel1.Sort(TABLE_NAME.FIELD1, "D", TABLE_NAME.FIELD2, "A");
Example:
Local Rowset &rsLevel1 = GetLevel0()(1).GetRowset(Scroll.PROG_TBL);
&rsLevel1.Sort(PROG_TBL.EFFDT, "D", PROG_TBL.PROGYEAR, "A");
Grid Name: Name of your main Record (Here it's PROG_TBL)
Sort: A - Ascending; D- Descending
Local Rowset &rsLevel1 = GetLevel0()(1).GetRowset(Scroll.TABLE_NAME);
&rsLevel1.Sort(TABLE_NAME.FIELD1, "D", TABLE_NAME.FIELD2, "A");
Example:
Local Rowset &rsLevel1 = GetLevel0()(1).GetRowset(Scroll.PROG_TBL);
&rsLevel1.Sort(PROG_TBL.EFFDT, "D", PROG_TBL.PROGYEAR, "A");