PeopleSoft translate value 排序

這個function 能夠對record.field 的dropdownlist 排序,也能夠把描述前邊加個數字。可是有時候用戶不接受。因此調用這個方法是比較好的選擇。排序

Function Order_By_Dropdown_List(&Record_name As string, &Field_name As string)
&Record_name = "Record." | &Record_name;
&Field_name1 = "Field." | &Field_name;
&Field = GetRecord(@&Record_name).GetField(@&Field_name1);
&Field.ClearDropDownList();
&Xlat = CreateRowset(Record.PSXLATITEM);
&Xlat.Fill("where FILL.FIELDNAME = '" | &Field_name | "' ORDER BY FILL.FIELDVALUE DESC");
&Xlat_Cnt = &Xlat.ActiveRowCount;
For &i = 1 To &Xlat_Cnt
&CodeIn = &Xlat.GetRow(&i).GetRecord(1).FIELDVALUE.Value;
&DescIn = &Xlat.GetRow(&i).GetRecord(1).XLATLONGNAME.Value;
&Field.AddDropDownItem(&CodeIn, Rept(Char(9), &i) | &DescIn);
End-For;
End-Function;pdo

相關文章
相關標籤/搜索