Built in functions used to control translate values dynamically.
Built in functions used to control translate values dynamically.We can control the Translate values in peoplecode using the functionAddDropDownItem.
Syntax :AddDropDownItem(CodeString, DescriptionString)
DescriptionThe AddDropDownItem method adds an item to the dropdown list in the control for thefield. The first time this method is called, it overrides the prompt table or translate tableused to populate the list. Those items no longer appear in the list. Only the items addedusing this method display.Subsequent calls to this method adds additional items to the dropdown list. The itemsadded with the first call to the method also display.If there is an existing value and the dropdown list is changed with these functions, theselection shows as (Invalid value) unless the new list contains an entry with the samecode as the existing value.Considerations Using AddDropDownItemIf the data for the dropdown is language sensitive, the values for the dropdown shouldcome from the message catalog or from a database field that has a related languagerecord, and should not be hard-coded.A good place for your Peoplecode program to populate a dropdown list is in the RowInitevent. This event executes before the page is shown for the first time, so it preventsunnecessary SQL.