Returns property values of the specified hierarchical tree.
FUNCTION GET_TREE_PROPERTY
(item_name VARCHAR2,
property NUMBER);
FUNCTION GET_TREE_PROPERTY
(item_id ITEM,
property NUMBER);
Returns VARCHAR2
Built-in Type unrestricted function
Enter Query Mode no
item_name |
Specifies the name you gave the object when you created it. 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. |
property |
Specify one of the following properties: DATASOURCE Returns the source used to initially populate the hierarchical tree, either in Oracle Forms or by using the SET_TREE_PROPERTY Built-in. Returns EXTERNAL if neither property was set in Oracle Forms. RECORD_GROUP Returns the RecordGroup used to initially populate the hierarchical tree, either in Oracle Forms or by using the SET_TREE_PROPERTY Built-in. This may be a null string. QUERY_TEXT Returns the text of the query used to initially populate the hierarchical tree, either in Oracle Forms or by using the SET_TREE_PROPERTY Built-in.. This may be a null string. NODE_COUNT Returns the number of rows in the hierarchical tree data set. SELECTION_COUNT Returns the number of selected rows in the hierarchical tree. ALLOW_EMPTY_BRANCHES Returns the character string TRUE or FALSE. ALLOW_MULTI_SELECT Returns the character string TRUE or FALSE. |
The values returned by datasource RECORD_GROUP and QUERY_TEXT do not necessarily reflect the current data or state of the tree. The values returned are those that were set in Oracle Forms and not those set using the SET_TREE_PROPERTY Built-in.
/*
** Built-in: GET_TREE_PROPERTY
*/
-- This code could be used to find out how many nodes are
-- in a given tree.
DECLARE
htree ITEM;
node_count NUMBER;
BEGIN
-- Find the tree itself.
htree := FIND_ITEM('tree_block.htree3');
-- Get the node count of the tree.
node_count := FTREE.GET_TREE_PROPERTY(htree, FTREE.NODE_COUNT);
END;
...