Hi Henka,
That's fine.I had already gone thru' it.But waht about my Question 2 and 3.Plz. answer.
Main Topics
Browse All TopicsFew questions...
1)Can you please elaborate on the SELECT....START WITH....
CONNECT BY.. CLAUSE. which we use in creating Record Group
for populating Tree.
2)Moreover my EMP table has foll. structure.
(FNAME VARCHAR2(15),
MINIT VARCHAR2(2),
LNAME VARCHAR2(15),
SSN NUMBER(12) NOT NULL,
BDATE DATE,
ADDRESS VARCHAR2(35),
SEX VARCHAR2(1),
SALARY NUMBER(7) NOT NULL,
SUPERSSN NUMBER(12),
DNO NUMBER(2) NOT NULL) ;
How will i modify the above SELECT....START WITH....
query to populate tree item with my EMP table.Why normal SELECT statements are not effective here.
3)Suppose user wants to create the nodes manually without populating it from any table.How he shoould go about it???
I am using Forms [32 Bit] Version 6.0.8.11.3 (Production)
Thanks in advance.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
2)
/*
** Built-in: SET_TREE_PROPERTY
*/
-- This code could be used in a WHEN-NEW-FORM-INSTANCE
-- trigger to initially populate the hierarchical tree
-- with data.
DECLARE
htree ITEM;
v_ignore NUMBER;
rg_emps RECORDGROUP;
BEGIN
-- Find the tree itself.
htree := Find_Item('tree_block.htre
-- Check for the existence of the record group.
rg_emps := Find_Group('emps');
IF NOT Id_Null(rg_emps) THEN
DELETE_GROUP(rg_emps);
END IF;
-- Create the record group.
rg_emps := Create_Group_From_Query('r
'select 1, level, lname, NULL, to_char(ssn) from emp connect by prior ssn = superssn start with ssn = 1');
-- Populate the record group with data.
v_ignore := Populate_Group(rg_emps);
-- Transfer the data from the record group to the hierarchical
-- tree and cause it to display.
Ftree.Set_Tree_Property(ht
END;
3)
/*
** Built-in: ADD_TREE_NODE
*/
-- This code copies a value from a Form item and
-- adds it to the tree as a top level node. The
-- value is set to be the same as the label.
DECLARE
htree ITEM;
top_node FTREE.NODE;
new_node FTREE.NODE;
item_value VARCHAR2(30);
BEGIN
-- Find the tree itself.
htree := Find_Item('tree_block.htre
-- Copy the item value to a local variable.
item_value := :wizard_block.new_node_dat
-- Add an expanded top level node to the tree
-- with no icon.
new_node := Ftree.Add_Tree_Node(htree,
Ftree.ROOT_NODE,
Ftree.PARENT_OFFSET,
Ftree.LAST_CHILD,
Ftree.EXPANDED_NODE,
item_value,
NULL,
item_value);
END;
Business Accounts
Answer for Membership
by: HenkaPosted on 2003-02-23 at 23:45:13ID: 8006769
I think that answers to your questions you can find in the Forms on-line help (About hierarchical trees and related topics:Format of data used to populate a hierarchical tree
...). There are also examples there.
2) see SET_TREE_PROPERTY built in example
3) see Adding a Node to Hierarchical Tree
Henka