/* 按权限显示字段translate value ; */ Local string &strC_Sched_Type; Local string &strXLATLONGNAME; Local string &isFlag; &FLD = GetRecord(Record.C_DATA_LOAD).GetField(Field.C_SCHED_TYPE); /* 清空字段默认translate value;*/ &FLD.ClearDropDownList(); Local number &SEQ_NUM = 1; /* 如果权限表中没有进行授权,则在字段translate value 中插入NULL; */ SQLExec("select 'X' FROM ps_c_data_auth_tbl WHERE emplid = :1 AND ROWNUM = 1 ", %EmployeeId, &isFlag); If &isFlag = "X" Then Local SQL &sql = CreateSQL("SELECT d.c_sched_type from ps_c_data_auth_tbl d WHERE d.emplid = :1 ORDER BY C_SEQ ASC; ", %EmployeeId); While &sql.Fetch(&strC_Sched_Type) SQLExec("SELECT XLATLONGNAME from psxlatitem WHERE FIELDNAME = 'C_SCHED_TYPE' AND FIELDVALUE = :1 ", &strC_Sched_Type, &strXLATLONGNAME); If &SEQ_NUM < 10 Then &FLD.AddDropDownItem(&strC_Sched_Type, "0" | &SEQ_NUM | "." | &strXLATLONGNAME); Else &FLD.AddDropDownItem(&strC_Sched_Type, &SEQ_NUM | "." | &strXLATLONGNAME); End-If; &SEQ_NUM = &SEQ_NUM + 1; End-While; Else &FLD.AddDropDownItem("", ""); End-If;