You can use the following Built-in subprograms to create and manipulate a parameter List:
Tip: Keep in mind the following when you create parameter Lists:
The following example creates a parameter List, adds two parameters to it, and then passes the List to a form by way of the CALL_FORM procedure:
/*
** Declare a variable of type ParamList to store
** the parameter List ID
*/
DECLARE
List_id ParamList;
BEGIN
/*
** Create a parameter List named "input_params"
*/
List_id := Create_Parameter_List('input_params');
/*
** Add two parameters to the List to pass values for each
** user-defined parameters defined in the target form; for each
** parameter, specify its key, type (text or data), and value
*/
Add_Parameter(List_id, 'CITY',TEXT_PARAMETER,'BOGOTA');
Add_Parameter(List_id, 'CATEGORY',TEXT_PARAMETER,'EXPORTS');
/*
** Now call the form, referencing the parameter List ID
** in the last argument to the CALL_FORM procedure
*/
Open_Form('trade',ACTIVATE,NO_SESSION,List_id);
END;
Each form includes a Built-in parameter List named Default. The Default parameter List contains all of the form parameters that were defined in the form at design time. For example, if you define parameters p1, p2, and p3 in Form A at design time, they are automatically included in the Default parameter List for Form A.
The Default parameter List can be passed to a called form by including it in the argument List of the OPEN_FORM, CALL_FORM, or NEW_FORM Built-in procedures.
DECLARE
the_List PARAMLIST:= Get_Parameter_List('default');
BEGIN
Open_Form('form_B',ACTIVATE, NO_SESSION,'default');
END;