Code to hide translate values dynamically

Your rating: None Average: 2 (12 votes)

Write the code in RowInit:
Local Rowset &Xlat;

&FLD = GetRecord(Record.PY_IC_WRK1).GetField(Field.ACCOUNT_TYPE_DD);
&FLD.ClearDropDownList();

&Xlat = CreateRowset(Record.PSXLATITEM);
&Xlat.Fill("WHERE FILL.FIELDNAME = 'ACCOUNT_TYPE_DD' AND FILL.FIELDVALUE IN ('C','S')");

&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;

&FLD.AddDropDownItem(&CodeIn, &DescIn);
End-For;

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!