The Parameters object is an entry point into the Function, Report, and Process Procedures. Parameters are means by which Functions, Reports, and Processes communicate with the outside world. Parameters can be thought of as placeholders for Variables (either local or database fields) or Constants that will be passed to the Procedure at runtime.

Parameters pick the contents of the runtime variables at the Procedure's entry point (which is the Parameters object) and carry them inside the Procedure's body, where they can be used for calculations, searches, assignments, etc.



The following is an explanation of how to load a New Parameter, specify its data type, and give it a meaningful name:

  1. The Workspace comes with the Parameters object preloaded, displaying a single receptacle (it is also re-loadable from the Palette in the event that an existing Procedure was modified to commence with a Start object and current re-modeling plans call for a Parameter start).

  1. Select the Parameters object (it will display its 8 control points).
  2. Determine how many Parameters are needed. If more than one, select the bottom center Control Point and drag down until the desired number of Parameter fields are displayed.
  3. Populate the Parameter field(s) by dragging or clicking on the New Parameter in the Local Resources of the Palette. This will cause a generic parameter names (e.g. par1) to be created and inserted in the Local Resources and the selected Parameter  field(s) of the Parameters object.
  4. Rename the generic parameter name(s): double-click a generic parameter name in the Resources Local. This will make the field editable and grey over the generic parameter name (e.g. par1). Type over the generic text with an appropriate description (e.g. Period, Start Date, Account Number, etc.). This will update the Resources Local and the Parameters.
  5. Select a data Type for each of the Parameters from the pop-up list adjacent to it (Text being the default).
    Please Note: Text type can be an editable field (at run-time) or a pop-up list selected from the Parameter's Inspector view:


Parameters are different from Variables
All variables used within a Procedure (whether user-defined, system or database fields) are private to this Procedure. This means that their contents is not "visible" to the world outside the Procedure; their names would not be recognized as legitimate variables in the Procedure that called this Procedure at runtime.



Parameters can provide two-way communication with the world.
If a Parameter is assigned a value in the Procedure e.g. through the Calculation statement, then this Parameter is deemed to be a Parameter of the IN/OUT type. The value assigned to the Parameter will become known to the Procedure (report or another function) that called this Procedure at the runtime; it will be placed into the Variable (known to the calling Procedure) at the end of the Procedure's execution. Thus, the Procedure can send data back to the calling Procedure, if necessary. Parameters that are never assigned a value in the Procedure are known to the Procedure as of IN-only type; they provide one-way communication from the caller to the Procedure.

Since variables that are passed through the Parameters object to the Procedure are defined outside the Procedure, their data types cannot be inferred from the context of the Procedure, as in the case of Local Variables. For this reason, the Parameters object provides the mechanism to explicitly set the Data Type of the Parameters through the pop-up list of standard data types; the user must decide what type of data each Parameter will carry. See the example below.

The following example shows a completed Parameter and its Legend Inspector view which is the counter part to the Function example shown under Function object.

Once defined in the Parameters object, parameters can be used in the function or report just like variables. Flow direction lines (arrows) cannot terminate on the Parameters object; it can only originate the connections.

Go to:
Index
Table of Contents