11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CREATE_PARAMETER_LIST built-in<br />

Description<br />

Creates a parameter list with the given name. The parameter list has no parameters when it is created;<br />

they must be added using the ADD_PARAMETER built-in subprogram. A parameter list can be passed<br />

as an argument to the CALL_FORM, NEW_FORM, OPEN_FORM, and RUN_PRODUCT built-in<br />

subprograms.<br />

Syntax<br />

FUNCTION CREATE_PARAMETER_LIST<br />

(name VARCHAR2);<br />

Built-in Type unrestricted function<br />

Returns ParamList<br />

Enter Query Mode yes<br />

Parameters<br />

name Specifies the VARCHAR2 name of the parameter list object.<br />

CREATE_PARAMETER_LIST restrictions<br />

When <strong>Form</strong> <strong>Builder</strong> creates the object, it assigns it a unique ID of type<br />

PARAMLIST. You can call the parameter list by name or by ID in later<br />

calls to parameter list-related built-in subprograms.<br />

• You cannot create a parameter list named DEFAULT. DEFAULT is reserved for the parameter list<br />

that <strong>Form</strong> <strong>Builder</strong> creates at the initiation of a runtime session.<br />

• You cannot create a parameter list if one already exists; to do so will cause an error. To avoid this<br />

error, use ID_NULL to check to see if a parameter list already exists before creating one. If a<br />

parameter list already exists, delete it before creating a new list.<br />

CREATE_PARAMETER_LIST examples<br />

/*<br />

** Built-in: CREATE_PARAMETER_LIST<br />

** Example: Create a parameter list named ’TEMPDATA’. First<br />

** make sure the list does not already exist, then<br />

** attempt to create a new list. Signal an error<br />

** if the list already exists or if creating the<br />

** list fails.<br />

*/<br />

DECLARE<br />

pl_id ParamList;<br />

pl_name VARCHAR2(10) := ’tempdata’;<br />

BEGIN<br />

pl_id := Get_Parameter_List(pl_name);<br />

IF Id_Null(pl_id) THEN<br />

pl_id := Create_Parameter_List(pl_name);<br />

IF Id_Null(pl_id) THEN<br />

Message(’Error creating parameter list ’||pl_name);<br />

61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!