Add Parameter

The Add Parameter task allows you to define input, output, and return parameters values for a Stored Procedure. It is only enabled if you set the Query Type as Stored Procedure (it replaces the Add Where task).

Clicking the Add Parameter task opens the Parameter Property panel. This panel includes the following functionality:

Direction

A drop-down list containing the direction of the parameter. The direction must match the direction of the corresponding parameter in the stored procedure. You can select one of the following values from the drop-down list:

InputDefines the parameter as an input.

OutputDefines the parameter as an output.

Input/OutputDefines the parameter as both input and output.

Return ValueDefines the parameter as a return value. A Stored Procedure that returns a value must define the first parameter with the Direction set to Return Value. There can be only one Return parameter.

SQL Type

A drop-down list containing the SQL type of the parameter. It must match the type of the corresponding parameter in the Stored Procedure. You can select one of the following values from the drop-down list:

INTEGERParameter is an integer value

FLOATParameter is a float value

VARCHARParameter is a variable or fixed-length character set value

CURSORParameter is a cursor that represents multiple table rows, for example, from a SQL query

DATEParameter is a Date value

TIMESTAMPParameter is a Date and Time value

BIGINTParameter is a big integer value (see the note below)

SMALLINTParameter is a small integer value

DOUBLEParameter is a double value

REALParameter is a real value

DECIMALParameter is a decimal value

TIMEParameter is a Time value

Note: Genesys Agent Scripting partially supports mapping the DB2 BIGINT data type in the Database Interface. It is supported with the following exceptions.

Parameter Name

This is the name of the parameter specified in the Stored Procedure.

Value Type

A drop-down list containing the type of the value. If the direction is an input then this field defines whether the input value of the parameter is either a specific value or is the contents of a specific field. If the direction is an output or return value, then the Value Type must be Field in order to define which field is to contain the output/return parameter value. This field is disabled for a parameter whose SQL Type is set to CURSOR. An output CURSOR parameter can be saved to a Table field by adding a Database Table and its associate columns to the Database Interface, matching results from the cursor, and mapping it to a Genesys Agent Scripting Field of type Table.

Field

This field displays when you select Field as the Value Type. Select the field whose content is to be passed as an input parameter or the field that is to contain the value of an output/return parameter.

Value

This field appears if one selects Value as the Value Type. In this field you can set a hard-coded value for an input parameter.

Although generally, Genesys Agent Scripting supports calls to Stored Procedures, the following restrictions apply: