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

DELETE_TREE_NODE Built-in

Description

Removes the data element from the tree.

Syntax

PROCEDURE DELETE_TREE_NODE
(item_name VARCHAR2,
node NODE);

PROCEDURE DELETE_TREE_NODE
(item_id ITEM,
node NODE);

Built-in Type unrestricted procedure

Enter Query Mode no

Parameters

item_name
 
Specifies the name of the object created at design time. The data type of the name is VARCHAR2 string.
Item_id
 
Specifies the unique ID that Oracle Forms assigns to the item when created. Use the FIND_ITEM Built-in to return the ID to an appropriately typed variable. The data type of the ID is Item.
 
node
 
Specifies a valid node

Usage Notes

Removing a branch node also removes all child nodes.

DELETE_TREE_NODE Examples

This code finds a node with the label "Zetie" and deletes it and all of its children.

/*
** Built-in: DELETE_TREE_NODE
*/

DECLARE

htree ITEM; 
delete_node FTREE.NODE; 

BEGIN

/* Find the tree itself. 
*/
htree := FIND_ITEM('tree_block.htree3'); 
 

/* Find the node with a label of "Zetie". 

** Start searching from the root of the tree.
*/

delete_node := FTREE.FIND_TREE_NODE(htree, 

'Zetie', 

FTREE.FIND_NEXT, 
FTREE.NODE_LABEL, 

FTREE.ROOT_NODE, 

FTREE.ROOT_NODE); 
 

/* Delete the node and all of its children.
*/
IF NOT FTREE.ID_NULL(delete_node)
THEN
FTREE.DELETE_TREE_NODE(htree, delete_node); 
END IF; 

END;