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

ADD_TREE_DATA Built-in

Description

Adds a data set under the specified node of a hierarchical tree item.

Syntax

PROCEDURE ADD_TREE_DATA (item_id ITEM,
node
FTREE.NODE,
offset_type
NUMBER,
offset
NUMBER,
data_source
NUMBER,
data
VARCHAR2);

PROCEDURE ADD_TREE_DATA (item_name VARCHAR2,
node
FTREE.NODE,
offset_type
NUMBER,
offset
NUMBER,
data_source
NUMBER,
data
VARCHAR2);

PROCEDURE ADD_TREE_DATA (item_name VARCHAR2,
node
FTREE.NODE,
offset_type
NUMBER,
offset
NUMBER,
data_source
NUMBER,
data
RECORDGROUP);

PROCEDURE ADD_TREE_DATA (item_id ITEM,
node
FTREE.NODE,
offset_type
NUMBER,
offset
NUMBER,
data_source
NUMBER,
data
RECORDGROUP);

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. There is a special value FTREE.ROOT_NODE which can be used to define the root of the tree.

offset_type

Specifies the type of offset for the node. Possible values are:

PARENT_OFFSET

SIBLING_OFFSET

If offset_type is PARENT_OFFSET, adds a data subset immediately under the specified node at the location among its children indicated by offset.

If offset_type is SIBLING_OFFSET, adds the new data as a sibling to the specified node.

offset

Indicates the position of the new node.

If offset_type is PARENT_OFFSET, then offset can be either 1-n or LAST_CHILD.

If offset_type is SIBLING_OFFSET, then offset can be either NEXT_NODE or PREVIOUS_NODE.

data_source

Indicates the type of data source. Possible values are:

RECORD_GROUP

QUERY_TEXT

data

Specifies the data to be added. If data source is QUERY_TEXT, then data is the text of the query. If data source is RECORD_GROUP, then data is an item of type RECORDGROUP or the name of a record group.

ADD_TREE_DATA Examples

/*
** Built-in: ADD_TREE_DATA */
 
-- This code copies a set of values from a record group
-- and adds them as a top level node with any children
-- nodes specified by the structure of the record group.
-- The new top level node will be inserted as the last
-- top level node.
 
DECLARE
htree ITEM; 
rg_data RECORDGROUP; 
BEGIN
-- Find the tree itself. 
htree := Find_Item('tree_block.htree3'); 
 
-- Find the record group. 
rg_data := FIND_GROUP('new_data_rg'); 
 
-- Add the new node at the top level and children. 
Ftree.Add_Tree_Data(htree, 
Ftree.ROOT_NODE, 
Ftree.PARENT_OFFSET, 
Ftree.LAST_CHILD, 
Ftree.RECORD_GROUP, 
rg_data); 
END;