How to pass Dynamic Drop Down Value using peoplecode

PeopleSoft provides the functions ClearDropDownList & AddDropDownItem to solve the problem defined above. Certain points to be noted:

1. The variable type (here &fld_TypeField_l) should be Field .

2. If the drop down box has been cleared using ClearDropDownList and subsequently NO AddDropDownItem function call has been used, all the default translate value descriptions will be displayed .

3. The format of AddDropDownItem is &Field_Variabe.AddDropDownItem('A', 'Approved'). Always note that the codes used in AddDropDownItem (here 'A')should be the same codes used in the translate .

/*** VARIABLE DECLARATIONS ****/
Local Field &fld_TypeField_l;

/*** GET THE FIELD ***/
&fld_TypeField_l = GetField(IMF_PAY_MSG_MST.ACTION_TYPE);

/*** CLERING THE DROP DOWN VALUE ****/
&fld_TypeField_l.ClearDropDownList();

/*** ADDING THE VALUES IN DROP DOWN ****/
&fld_TypeField_l.AddDropDownItem('A', 'Approved'); 
&fld_TypeField_l.AddDropDownItem('C', 'Cancelled'); 
&fld_TypeField_l.AddDropDownItem('P', 'Pending'); 
&fld_TypeField_l.AddDropDownItem('O', 'On-Hold'); 
&fld_TypeField_l.AddDropDownItem('R', 'Rejected');



SHARE

peoplesoft

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Phaniraavi@gmail.com