A script-enabled browser is required for this page to function properly.

Passing Parameters to Forms

When you invoke a form with the procedures OPEN_FORM, CALL_FORM, or NEW_FORM, you can pass values for form parameters from the calling form to the called form.

To pass parameter values from one form to another, each parameter and its value must be in a parameter List. Parameter Lists are internal, three-column data structures that contain the key (name), the type (Text_Parameter or Data_Parameter) and the value of each parameter on the List.

The parameters whose values are being passed must have been defined in the called form at design time. That is, the called form must be expecting a value for each of the parameters included in the parameter List it receives from the calling form.

You can define parameters in a form in the Object Navigator at design time and also programmatically at runtime. The properties of a parameter include Name, Parameter Data Type, Length, and Parameter Initial Value. Parameter Lists must be created programmatically with the Built-in routines CREATE_PARAMETER_LIST and ADD_PARAMETER.

Parameter values are not visible across multiple forms. Thus, even if there is a parameter named p1 defined in both Form A and Form B, each form has a separate context, and setting the value of p1 in Form B has no effect on the value of p1 in Form A. For this reason, parameters are useful in multiple-form applications primarily as inputs to a form when it is first invoked.

If your application requires variables whose values are visible across called forms, you should use global variables. Global variables are visible across called forms, and remain active until they are explicitly deleted with the ERASE Built-in procedure, or until the session ends.


ADD_PARAMETER Built-in

CREATE_PARAMETER_LIST Built-in

Creating and Passing Parameter Lists

The default parameter List

Parameter validation

Initial values of parameters in a called form

About global variables