How to Sort Scroll Area / Grid Column Level 1by Peoplecode Of PeopleSoft
Example 1
ScrollFlush(Record.TS_INFO_FILE);
ScrollSelect(1, Record.TS_INFO_FILE, Record.TS_INFO_FILE, “Where emplid = :1 and YEAR = :2 ORDER BY decode(TS_FILE_TYPE, ‘NID’, 1, ‘ADD’, 2, ‘LIC’, 3 )”, %EmployeeId, &YEAR);
Example 2
&rs= GetLevel0()(1).GetRowset(Scroll.TS_INFO_FILE);
&rs.Sort(TS_INFO_FILE.FIELD1, “A”, TS_INFO_FILE.FIELD2, “D”, TS_INFO_FILE.FIELD3, “A”);
Example 3
ScrollFlush(Record.TS_INFO_FILE);
ScrollSelect(1, Record.TS_INFO_FILE, Record.TS_INFO_FILE, “Where emplid = :1 and YEAR = :2 “, %EmployeeId, &YEAR);
sortscroll(1, Record.TS_INFO_FILE,TS_INFO_FILE.FIELD1, “A”, TS_INFO_FILE.FIELD2, “D”);
Example 4
ScrollFlush(Record.TS_INFO_FILE);
ScrollSelect(1, Record.TS_INFO_FILE, Record.TS_INFO_FILE, “Where emplid = :1 and TS_YEAR_MM = :2 ORDER BY decode(TS_FILE_TYPE, ‘NID’, 1, ‘ADD’, 2, ‘HOME’, 3 )”, %EmployeeId, &TS_YEAR_MM);