Hierarchical tree

Hi All,
I have created a tree and populated it with data. I populated the tree upto the depth of 4 using Add_tree_node method.
I have written a code on the trigger when_tree_node_selected. The code gets the value of the tree node and insert it into a field. Now when I want to go to the parent node using the mehtod 'get_tree_node_parent', it gives an error message
FRM-47307 - Cannot get the properties of the tree root node.
I actually want to retrieve the data from the node I have selected and of all its parent node upto the root node.
Is there any other method for this
Thanx in advance

Hi!
I created a recordgroup to populate the tree.The built in get_tree_node_parent worked fine.

Similar Messages

  • Can i have a check box in the hierarchical tree in the icons place, urgent!!! please

    Hi,
    I'am working on the Hierarchical Tree structure which should have three levels, I need to have a check box in the place of the icon & if i select a node that node & the child nodes should get selected.
    After this when i say move selected ( i'am trying to use picklist class also) the entire checked tree has to move to the display area to the right & should display as tree structure & after this if i save then the checked records which are moved to another text area should get saved!!
    How to achieve this? I have the tree structure ready but the check box part is the worrying factor! & then moving the checked records to the right using picklist class is the second problem & finally saving records to database.
    Any help in this regard will be deeply appreciated:)
    If check box is not possible then i will have to look at other methods, will the tree structure allow checkboxes????
    Thanks
    Mahesh

    No the tree will not allow checkboxes

  • How to go to a particular node in a hierarchical tree?

    I want to do this simple thing with a Forms hierarchical tree.
    Since tree has lots of levels and branches I want to give a search box.
    User types the label and press a button. The form then has to query the tree node and expand ONLY the path where the node is (if found) and highlight it. If a node with a label is NOT found I give an error message to the user.
    I got hold of a code segment to explode a tree and modified it, but it does not work. The entire tree is expanded and you don't know where you are.
    Any help will be greatly appreciated?
    PROCEDURE Expand_All_Nodes_in_Tree IS
         node ftree.node;
         htree ITEM;
         state varchar2(30);
    BEGIN
         -- Search the tree identifiant --
         htree := Find_Item('menu.tree');
         -- Search the root --
         node := Ftree.Find_Tree_Node(htree, '');
         -- Expand all nodes --
         WHILE NOT Ftree.ID_NULL(node) LOOP
         state := Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_STATE);
         IF state = Ftree.COLLAPSED_NODE THEN
         Ftree.Set_Tree_Node_Property(htree, node, Ftree.NODE_STATE, Ftree.EXPANDED_NODE);
         END IF;
         node := Ftree.Find_Tree_Node(htree, '', ftree.find_NEXT,Ftree.NODE_LABEL,'', node);
    IF Ftree.Get_Tree_Node_Property(htree, node, Ftree.NODE_LABEL) = :ctrl.node_lable_to_search THEN
    EXIT;
    END IF;     
         END LOOP;
    END;

    Hi Channa,
    Try this code with you tree i am using the same situation and this code is working perfect with me.
    PROCEDURE find_node_in_tree(search_string varchar2, find_type varchar2) IS
    htree ITEM;
    search_start_node ftree.node;
    find_node ftree.node;
    BEGIN
    htree := Find_Item('blk_tree.main_tree');
         search_start_node := nvl(ftree.get_tree_selection(htree,1),ftree.root_node);
         find_node := ftree.find_tree_node(htree,upper(search_string)||'%',ftree.find_next,ftree.node_label,ftree.root_node,search_start_node-1);
         if find_node = 0 then
              find_node := 1;
    end if;
    Ftree.Set_Tree_selection(htree, find_node, Ftree.SELECT_ON);
    exception
         when others then
              NULL;
    END;
    -Ammad

  • URGENT *** Hierarchical Tree in Forms 9i *** URGENT

    Hello everybody,
    for my company I need to build a hierarchical tree item, that will display static data over three levels. Let's say: departments, employees and employee projects.
    How do I fill the Item?
    When do I fill the Item?
    Where do I fill the Item?
    What are the elements of the SQL query, that fills the hierarchical tree?
    Any help will be appreciated
    [email protected]

    Note:210663.1 helped a bit.
    I used the database column as the third element in the select part and put NULL as the fifth element. Then it worked.
    Now I am looking for the way to add the employees, when the user selects / activates a department node.

  • Hierarchical Tree error - fighting for over a year

    For over a year now, our Oracle forms have presented an elusive problem with Hierarchical Trees. First some core information:
    We are running Developer 6i, patchset 8, on a Sun host and an Oracle 8i database. Our forms are deployed over the web on the
    Oracle Application Server using J-Initiator 1.1.7.27.
    Now, only on our Production platform, and only during busy times of the day, we randomly get the error "Invalid Query for Hierarchical
    Tree" when one of our tree-based forms populates the tree. This error is sometimes followed by the infamous
    FRM-92100 "connection has been terminated" error. This happens whether building the tree with a single Selec and Populate Treet,
    or via a systematic series of Add Tree Node calls.
    We have tried rebuilding the form logic to eliminate form corruption, (form corruption - happens if you open a large FMB in the
    forms developer without first being connected to the database, manifests itself as random and odd form behaviour,
    or FRM-92100 errors, Oracle product support denies it really happens), we have added debug code, we've even tried generating
    the FMX on the Production platform as part of our deployment (normally we generate FMX files on our Integration platform
    which mirrors Production).
    We are not scheduled to upgrade for Forms 9i and the 9IAS for several more months, so upgrading isn't an immediate option for us.
    Any and all ideas welcome.
    Jeff Cline

    Hi Nigel,
    Two questions:
    1. When the publisher sends the access permission to the subcriber by:
    netStream.send("|RtmpSampleAccess", true, true)
    , on the subscriber side, what event or function can handle the guaranteed receipt of the access permission? Currently it is possible to draw the incoming stream video upon receiving NetStream.Play.Star and waiting for 5 seconds or so:
    public class MyWebcamSubscriber extends WebcamSubscriber {
    override protected function layoutCameraStreams():void
    // trying the event listener seems to work here.
    _streamManager.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
    override protected function onNetStatus(e:NetStatusEvent):void
    super.onNetStatus(e);
    case "NetStream.Play.Start":
    setTimeout(function():void {
    // draw the video from the incoming stream here.
    }, 5000);
    The questions is, which event can let the subscriber know that it has the access permission to the video stream?
    2. In WebcamPublisher, why is that the access permission is sent 3 times?
    a. Once on receiving NetStream.Connect.Success with 0.5 second delay, as in below.
    b. Once immediately upon receiving NetStream.Connect.Success, as in below.
    protected function onNetStatus(p_evt:NetStatusEvent):void
    if (p_evt.info.code=="NetStream.Connect.Success") {
    setTimeout(sendSnapShotPermission, 500);
    _stream.send("|RtmpSampleAccess", true, true);
    protected function sendSnapShotPermission():void
    _stream.send("|RtmpSampleAccess", true, true);
    c. Once in onConnectionTypeChange() with 2 seconds delay:
    protected function onConnectionTypeChange(p_evt:StreamEvent):void
    if ( _streamManager.isP2P) {
    _stream= new NetStream(_connectSession.sessionInternals.session_internal::connection as NetConnection,NetStream.DIRECT_CONNECTIONS);
    setTimeout(sendSnapShotPermission, 2000);

  • It's possible to make Hierarchical Tree from multiple tables ?

    the famous example for Hierarchical Tree is about employee_id and manager_id field in employees table ............ so I was wondering it's possible to make[b] Hierarchical Tree from multiple tables ? and How ??
    if the answer associate with example that will be so kind of you :D
    and thanks in advance.

    HI
    use curose in when new form instance or procedure then u can got data more then one table like that
    DECLARE
    htree ITEM;
    top_node FTREE.NODE;
    new_node FTREE.NODE ;
    child_node ftree.node ;
    item_value VARCHAR2(30);
    cursor prime_cur is select main_desc mgr_name, main_code dept
    from pur_item_group_mst;
    cursor child_cur(v_dept number) is select sub_desc,sub_code
    from pur_item_group_dtl where main_code = v_dept ;
    BEGIN
    htree := Find_Item('tmp.tree4');
    for dummy in prime_cur loop
    new_node := Ftree.Add_Tree_Node(htree,
    ftree.root_node,
    Ftree.PARENT_OFFSET,
    Ftree.LAST_CHILD,
    Ftree.EXPANDED_NODE,
    dummy.mgr_name,
    'D:\ORYX_POLYBAGS\accept',
    dummy.dept);
    for child in child_cur(dummy.dept) loop
         child_node := Ftree.Add_Tree_Node(htree,
    new_node,
    Ftree.PARENT_OFFSET,
    Ftree.LAST_CHILD,
    Ftree.EXPANDED_NODE,
    child.sub_desc||' '||'('||child.sub_code||' '||')',
    'D:\ORYX_POLYBAGS\next',
    child.sub_code);
    end loop;
    end loop;
    END;
    Rizwan Shafiq
    www.rizwanshafiq.blogspot.com

  • How to set the control-on hierarchical tree nodes

    Hi,
    I have created form in which at the left it has hierarchical tree structure(BOM) and towards the right it brings up the query results for selected node.
    Now, I have a button upon clicking which I navigate to the root node by issuing
    "Ftree.set_Tree_selection(htree, 1, Ftree.select_on);".
    But, it cannot automatically run the ' when-tree-node-selected' trigger '.
    any solution???
    Its really urgent.I have a customer demo on monday.
    Please help me asap.
    regards,
    Nagadeep.

    Hello Nagadeep,
    couldn't you just put the code from the trigger into a procedure
    and run that after the navigation to the item?
    Just a thought,
    Bernd
    The docs state that:
    No programmatic action will cause the When-Tree-Node-Selected trigger to fire. Only end-user action will generate an event.
    Probably due to performance reasons.
    Bernd
    Message was edited by:
    Bernd Prechtl

  • Finding proper help on Hierarchical Trees

    Have spent a couple of hours trying to navigate the sprawling website of oracle.com with the purpose finding and then downloading the appropriate help file. I downloaded
    Oracle9i Developer Suite Release 2 Documentation Library
    from
    http://www.oracle.com/technology/documentation/ids.html
    Its about 130Mb, installed it, but could i find comprehensive documentation on using Forms 9i (in particular Hierarchical Trees) no, but everything else it seemed yes. The original doc that pre-installed with the 9i DS 'online help' is reasonably helpful but like some others on this forum I could not find proper help on how to use Hierarchical Trees all i could find was few descriptive portions of text and believe me i have looked.
    Others have said they found examples of Hierarchical Trees usage i can only assume they are using 10g. So this is a desperate plea to you. Can you point me to an online resource that deals with Hierarchical Trees in Forms 9i (intro, usage, examples, etc). If you can i would deeply appreciate it.
    Mr Frustrated :)

    Hi,
    You have a lot of sample With the Forms Help.
    If you search in the index with "htree."
    The command hierarchical tree complete list appear.
    L.

  • Add checkbox on the nodes of Hierarchical tree in oracle forms 9i

    Hi,
    I am working on oracle forms 9i.I have to add checkbox at the place of node(+/-) in Hierarchical tree so,
    that user can select or deselect the Tree.That can do in oracle forms but how i don't know.
    can anybody help me.....
    Regards,
    Hemant

    You can't change this aspect of the Tree Control in Oracle Forms using built-in functionality. You might be able to extend the Tree Control using Java, but you have to do this yourself. : (
    Craig...

  • Can I use Hierarchical Tree from Forms6.0 in Forms5.0

    Hello
    The Oracle Custumer Support tell me that it should be possible to
    use Hierarchical Trees also in Forms5.0
    I look for a possibility to build a Navigator in Forms5.0
    with Symbols. (look and feel like the Navigator in Forms6.0 if I
    use Symbols in the Record Group).
    I Description should be on
    http://developer.us.oracle.com
    but either i have no access to this side or
    the URL is false.
    Sure is that there is a description over this Problem.
    And i have to get this description ;-)))
    Thanks for Help
    JK
    null

    That is not recommended. The new code editing features do not play well with an old workspace.
    Please create a new workspace and import your projects into that.
    -Anirudh

  • Make an hierarchical Tree in oracle Forms 6i

    Hi everybody,
    I want to make an hierarchical tree. I work in Forms 6i
    I create one non database block e.g. 'Bloc2' then
    add hierarchical control item in that. e.g 'Menu'.
    I create a record group named 'RG_DATA_TEST'
    Before I use a table in this record_group.
    I want a tree as this :
    - Menu1
    Menu1 option1
    Menu1 option2
    - Menu1 option3
    Menu option3 Sub opt 3
    + Menu2
    the table 'Menu_tree' is described' :
    CREATE TABLE MENU_tree
    ID NUMBER(5),
    LABEL VARCHAR2(128 BYTE),
    ICON VARCHAR2(40 BYTE),
    MASTER NUMBER(5),
    STATUS NUMBER(1) DEFAULT 1,
    VALUE VARCHAR2(128 BYTE)
    Here the data in the table :
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (1, 'Menu1', 'mainmenu', NULL, 1, NULL);
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (
    2, 'Menu1 Option 1', 'optionmenu', 1, 1, 'Dialog11');
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 3, 'Menu1 Option 2', 'optionmenu', 1, 1, dialog12');
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (4, 'Menu1 Option 3', 'optionmenu', 1, 1, NULL);
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 5, 'Menu1 Opt 3 Sub Opt 3', 'suboptionmenu', 4, 1, 'Dialog131');
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 6, 'Menu2', 'mainmenu', NULL, -1, NULL);
    INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 7, 'Menu2 Option1', 'optionmenu', 6, 1,'Dialog21');
    The record_group use this instruction SELECT :
    SELECT STATUS, LEVEL, LABEL, ICON, VALUE
    FROM MENU_tree
    CONNECT BY PRIOR ID = MASTER
    START WITH MASTER IS NULL
    And At the trigger When_new_form_instance , i do this code :
    DECLARE
    htree ITEM;
    V_IGNORE number;
    BEGIN
    HTREE := FIND_ITEM('BLOC2.MENU');
    V_IGNORE := POPULATE_GROUP('RG_DATA_TEST');
    FTREE.POPULATE_TREE(htree);
    END;
    When i run the forms, It don't give me a structure of node.
    It give me only a icon with two arrows.
    Where is the problem ?
    Must I add code somewhere ?
    Help me for your ideas.
    Regards.
    Edited by: 794982 on 17 sept. 2010 04:55
    Edited by: 794982 on 17 sept. 2010 05:01
    Edited by: 794982 on 17 sept. 2010 05:04
    Edited by: 794982 on 17 sept. 2010 05:06
    Edited by: 794982 on 17 sept. 2010 05:13
    Edited by: 794982 on 17 sept. 2010 05:19
    Edited by: 794982 on 17 sept. 2010 05:23

    Ok Francois Thanks for your response.
    Just I pricise i work with oracle forms version 9.0.4.0.19 .
    But I am putting this code in trigger When_New_form_Instance but it didn't work.
    When I execute it just shows a line with two arrows but not a real tree.
    Then I do a block-non based and a elemnt with type hierarticall tree and a canevas.
    and i create a record_group. and in a palette property of the element i precise the canevas and the record_group
    I don't khnow where is the problem ?
    Any other suggestion ? please
    Regards.

  • Hierarchical tree item - how to improve performance

    I'm loading hierarchical tree item with query.
    Problem is that it takes very long to load all the items(300, but can be more) to the hierarchical item.
    Query takes 0.5 sec., but loading it into the item with Set_Tree_Property(htree, Ftree.RECORD_GROUP
    the code:
    PL1 := Create_Group_From_Query('pl1', query);
    v_ignore := Populate_Group(PL1); -- 0.5 sec
    Ftree.Set_Tree_Property(htree, Ftree.RECORD_GROUP, PL1); -- 3 sec.
    Does anyone have any idea what to do to improve tree loading?

    Hello,
    try to play a little bit with the state-column of your query. If you only display the first hierarchy level
    and set the state of the "hidden" nodes to open, I think ist is the state 1, then it works much faster.
    cu
    Matthias M|ller

  • Connect by prior working in sql but not in forms 10g hierarchical tree

    Hello Friends,
    I have the following connect by prior example which is working in sql command prompt but not in Forms 10g hierarchical tree item type. Can you please let me know why ?
    configuration: Forms 10g patchset 10.1.2.0.2 and oracle 11g database on windows 7
    SQL> SELECT 1 InitialState,
    2 level Depth,
    3 labeller NodeLabel,
    4 NULL NodeIcon,
    5 to_char(reportno) NodeValue
    6 FROM reports where formname = 'billinin.fmx' or reportno > 9999
    7 start with reportno > 9999
    8 CONNECT BY PRIOR reportno = labelno
    9 /
    INITIALSTATE DEPTH NODELABEL N NODEVALUE
    1 1 FIRST 10000
    1 2 report1 UD Label 1
    1 2 report2 UD Label 2
    1 2 report3 UD Label 3
    1 1 SECOND 10001
    1 1 THIRD 10002
    If I write this command in forms hierarchical tree, then it is working, why not the above code ?
    SQL> SELECT 1 InitialState,
    2 level Depth,
    3 labeller NodeLabel,
    4 NULL NodeIcon,
    5 to_char(reportno) NodeValue
    6 FROM reports
    7 start with reportno > 9999
    8 CONNECT BY PRIOR reportno = labelno

    Thanks Room,
    This command worked ! I will put the sample working code here. It will help you to filter the records in a tree in sql command prompt as well as in forms hierarchical tree 10g.
    SELECT 1 InitialState,
    level Depth,
    labeller NodeLabel,
    NULL NodeIcon,
    to_char(reportno) NodeValue
    FROM reports
    start with reportno > 9999
    CONNECT BY PRIOR reportno = labelno
    AND FORMNAME = :reports.testitem

  • Problem when selecting child node in Hierarchical Tree

    I have a hierarchical tree on a form populated thru a table query(form1). When I click on a child node, it opens form2 which contains a tab canvas. After closing forms, I return to the form1(containing Tree). At this point If I want to click on the same child node, I should be able to open form2 again. This doesn't happen.
    I have the following code in my When-Tree-node_selected trigger:
    Declare
    htree item;
    vnode_label varchar2(50);
    node_clicked FTREE.NODE;
    vnode_value number;
    vnode_depth number;
    v_type number;
    v_value varchar2(100);
    v_form_name varchar2(100);
    v_alert_return number;
    begin
    -- Find the tree itself.
    htree := FIND_ITEM('tree_block.tree');
    node_clicked := :SYSTEM.TRIGGER_NODE;
    vnode_value := FTREE.NODE_label;
    -- Find the value of the node clicked on.
    vnode_label := FTREE.GET_TREE_NODE_PROPERTY (htree,:SYSTEM.TRIGGER_NODE,FTREE.NODE_label);
    vnode_depth := to_number(ftree.get_tree_node_property(htree,:SYSTEM.TRIGGER_NODE,ftree.Node_depth));
    --Open form for node selected on tree and/or specific tab page
    if vnode_depth <> 1 then
    if :system.trigger_node_selected = 'TRUE' then CASE vnode_label
    WHEN 'Personal' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    WHEN 'Citizenship' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    WHEN 'Emergency Contact' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    if id_null(Find_form(v_form_name)) then
    open_form(:global.application_path || v_form_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA);
    else
    go_form(v_form_name);
    end if;
    END IF;
    elsif vnode_depth = 1 then
    if :system.trigger_node_SELECTED = 'TRUE' then CASE vnode_label
    WHEN 'EMPLOYEE INFO' then
    v_form_name :='HR_PERSONAL_INFO_UPDATE';
    vnode_label := 'Personal';
    WHEN 'REPORTS' then
    v_form_name :='HR_REPORTS';
    vnode_label := '';
    if id_null(Find_form(v_form_name)) then
    v_form_name := :global.application_path || v_form_name;
    open_form(v_form_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA);--,p_list);
    else
    go_form(v_form_name);
    end if;
    end if;
    end;
    Can anyone please help me? I don't want the user to double click. They should only click once.
    Thanks,
    Mercedes

    Right clicking does not change the current selection. The tree has no way to report what node was right clicked. Only work around is to left click the node you wish then right click it.
    --pat                                                                                                                                                                                                                                                                                                                                                                                                       

  • Hierarchal tree in FORMS

    Hi,
    I have a hierarchal tree table that I want to represent using forms (insert and update data in the tree table).
    Are there any LINKS or documentation that can help me with my little project :-)
    Thanks,
    Marc.

    The help file has a fairly detailed description of how to manipulate the tree control.
    Provided you have a table that can do this I would do "connect by prior" and "start with" SQL statement and use the pseudo column called "level" to determine when to create a new sub tree and when to end it.

  • Using hierarchical tree in developer 10g

    Hi all
    how can we use hierarchical tree in developer 10g any white paper will be helpfull
    thanks

    Hello
    <p>Here is a first sample<br>You could probably find others on this forum or by Googling<p>
    Francois

Maybe you are looking for

  • Trying to upgrade PPC G4 from 10.3.9 to 10.5, getting error message

    I'm trying to upgrade a PowerMac G4 to 10.5 from 10.3.9.  Is there a free file I can download to upgrade the OS to 10.5 or do I need to purchase it and if so, where can I get it?

  • JS CS3 search metadata

    Hi All, I'm sure someone here had posted this great code to parse a files metadata. function parseMetadata(xmp, tag) {                         var re = new RegExp('<' + tag + '>(.+)</' + tag + '>');                         var m = xmp.match(re);     

  • UC560 loopback network unreachable

    Hello, I got problem with imported CDR on a ftp server. It brings me an error message which is talking about the loopback network unreachable.

  • Ctrl D to place items in illustrator

    I spend most of my working life using InDesign, where Ctrl D is used to place an item. It would be good to be able to do this in illustrator as a matter of consistency between the programs. Thanks for listening! best regards, Steve

  • Project System - How to do reversal of Settlement

    Hi Gurus, Please tell me how can i do the reversal for monthly or Final Settlement, if i settled something? Pleaser revert asap. Thank You