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

FIND_TREE_NODE Built-in

Description

Finds the next node in the tree whose label or value matches the search string.

Syntax

FUNCTION FIND_TREE_NODE
(item_name VARCHAR2,
search_string VARCHAR2,
search_type NUMBER,
search_by NUMBER,
search_root NODE,
start_point NODE);

FUNCTION FIND_TREE_NODE
(item_id ITEM,
search_string VARCHAR2,
search_type NUMBER,
search_by NUMBER,
search_root NODE,
start_point NODE);

Built-in Type unrestricted function

Returns NODE

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.
 
search_string
 
Specifies the VARCHAR2 search string.
 
search_type
 
Specifies the NUMBER search type. Possible values are:


FIND_NEXT

FIND_NEXT_CHILD
Searches only the children of the search_root node.

search_by
 
Specifies the NUMBER to search by. Possible values are:


NODE_LABEL

NODE_VALUE

search_root
 
Specifies the root of the search tree.
 
start_point
 
Specifies the starting point in the NODE search.
 

FIND_TREE_NODE Examples

/*

** Built-in: FIND_TREE_NODE
*/

-- This code finds a node with a label of "Doran"
-- within the subtree beginning with the node labeled
-- "Zetie". 

DECLARE
htree ITEM; 
find_node FTREE.NODE; 
BEGIN
-- Find the tree itself. 
htree := FIND_ITEM('tree_block.htree3');  
-- Find the node with a label "Zetie". 
find_node := FTREE.FIND_TREE_NODE(htree,
'Zetie',
FTREE.FIND_NEXT, 
FTREE.NODE_LABEL,
FTREE.ROOT_NODE,
FTREE.ROOT_NODE);
  

diagram showing finding the node labeled Zetie

-- Find the node with a label "Doran" 
-- starting at the first occurance of "Zetie". 

find_node := FTREE.FIND_TREE_NODE(htree,
'Doran',
FTREE.FIND_NEXT, 

FTREE.NODE_LABEL,
find_node,
find_node); 
 
IF NOT FTREE.ID_NULL(find_node)
then 
... 
END IF; 
END;