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

CLEAR_LIST Built-in

Description

Clears all elements from a list item. After Oracle Forms clears the list, the list will contain only one element (the null element), regardless of the item's Required property.

Syntax

PROCEDURE CLEAR_LIST
(list_id ITEM);

PROCEDURE CLEAR_LIST
(list_name VARCHAR2);

Built-in Type unrestricted procedure

Enter Query Mode yes

Parameters

list_id 
 
Specifies the unique ID that Oracle Forms assigns when it creates the list item. Use the FIND_ITEM Built-in to return the ID to an appropriately typed variable. The data type of the ID is ITEM.
 
list_name 
 
The name you gave to the list item when you created it. The data type of the name is VARCHAR2.

Usage Notes

For example, assume that a list item contains the values A, B, and C and the Mapping of Other Values property is defined. Assume also that these values have been fetched from the database (a query is open). At this point, if you clear the list with CLEAR_LIST, an error will occur because Oracle Forms will attempt to display the previously fetched values (A, B, and C), but will be unable to because the list was cleared.

Before clearing a list, close any open queries. Use the ABORT_QUERY Built-in to close an open query.

Note: The block status is QUERY when a block contains queried records. The block status is CHANGED when a block contains records that have been either inserted or updated (queried records have been modified).

CLEAR_LIST Restrictions

When either the default value or other values element cannot be deleted, CLEAR_LIST leaves these elements in the list and clears all other elements. Refer to the restrictions on DELETE_LIST_ELEMENT for more information.

CLEAR_LIST Example

/*

** Built-in: CLEAR_LIST
** Example: See POPULATE_LIST
*/