• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
记得承诺过
博客园    首页    新随笔    联系   管理    订阅  订阅

PeopleSoft translate value 排序

"Dropdown list sort 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;

posted @ 2017-09-01 10:22  记得承诺过  阅读(419)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3