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.

CLEAR_LIST built-in<br />

Description<br />

Clears all elements from a list item. After <strong>Form</strong> <strong>Builder</strong> clears the list, the list will contain only one<br />

element (the null element), regardless of the item’s Required property.<br />

Syntax<br />

PROCEDURE CLEAR_LIST<br />

(list_id ITEM);<br />

PROCEDURE CLEAR_LIST<br />

(list_name VARCHAR2);<br />

Built-in Type unrestricted procedure<br />

Enter Query Mode yes<br />

Parameters<br />

list_id Specifies the unique ID that <strong>Form</strong> <strong>Builder</strong> assigns when it creates the list<br />

item. Use the FIND_ITEM built-in to return the ID to an appropriately<br />

typed variable. The data type of the ID is ITEM.<br />

list_name The name you gave to the list item when you created it. The data type of<br />

the name is VARCHAR2.<br />

Usage Notes<br />

• Do not use the CLEAR_LIST built-in if the Mapping of Other Values property is defined and there<br />

are queried records in the block. Doing so may cause <strong>Form</strong> <strong>Builder</strong> to be unable to display records<br />

that have already been fetched.<br />

For example, assume that a list item contains the values A, B, and C and the Mapping of Other Values<br />

property is defined. Assume also that these values have been fetched from the database (a query is<br />

open). At this point, if you clear the list with CLEAR_LIST, an error will occur because <strong>Form</strong> <strong>Builder</strong><br />

will attempt to display the previously fetched values (A, B, and C), but will be unable to because the<br />

list was cleared.<br />

Before clearing a list, close any open queries. Use the ABORT_QUERY built-in to close an open<br />

query.<br />

Note: The block status is QUERY when a block contains queried records. The block status is<br />

CHANGED when a block contains records that have been either inserted or updated (queried records<br />

have been modified).<br />

CLEAR_LIST restrictions<br />

• For a Poplist or T-list-style list item, CLEAR_LIST will not clear the default value element or the<br />

other values element from the list if they do not meet the criteria specified for deleting these<br />

elements with DELETE_LIST_ELEMENT.<br />

41

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

Saved successfully!

Ooh no, something went wrong!