Sometime we need to populate values of drop-down list based on value of another field or some other condition.
/*Declare Local Variable*/
Local SQL &SQL;
Local Rowset &rset;
Local Field &field;
Local string &type, &descr;
/* Getting the level 0 and level 1 records */
/* Getting the field to which the drop down is attached */
/* Clearing all existing values*/
/* SQL for fetching values that to be added in drop down.*/
While &SQL.Fetch(&fieldvalue, &xlatlongname)
& field.AddDropDownItem(&fieldvalue, &xlatlongname);
End-While;