Htree and recordgroup

hiii.....
i have 1 htree item on form....i have creted 1 recordgroup with query " select * from table1".... table having 3 columns...
and have folowing code
DECLARE
htree ITEM;
rg_data RECORDGROUP;
BEGIN
-- Find the tree itself.
htree := Find_Item('tree1');
-- Find the record group.
rg_data := FIND_GROUP('RG1');
-- 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;
........when i run above code i dont get any error..but it doesnot display anything...
and in the status bar i get following msg...
FRM-47321 Data used to populate the tree is invalid...
so what is the way if i want to populate the tree with recordgroup....

You need 5 columns. I could write them out again here or you could look at your other thread on the same subject. You don't need a new thread each day.
Htree data display problem...
Message was edited by:
James Healy
Either of your other threads will do
recordgroup

Similar Messages

  • How to use template or fragment in PDF form

    Hi Expert,
    As required by project, I want to create a sample form only with company logo in header and address info in footer. Then this sample form can be made as a template. Any new form development will use this template form, no need to maintain logo and footer one by one.
    above is my requirement. In transaction SFP, I can see Tools->Template manager->add template. I tried to save my sample form as a template, but when preview it, no displaying but with error saying "not well format".
    Can anyone help me? I just want to create and use a custom template or fagment (it is said Fragment can also reuse to meet my requirement. but I also don't know how to use fragment).

    Hi
    I'm also starting with hierachical tree (HTree) and I got an example from any Oracle examples or whatever. It works with the 'hr' schema (employee, manager, department).
    In the case that I'm not finding any tutorial about htree, I'm taking this one as an example to build my own htree. If you are interested, I can email the example to you.
    regards
    remo

  • Validation unit

    I have a form module that the form module property validation unit is set to FORM. However, I want to do an immediate validation on some of the items. When_validate_item trigger does not fire on this items. Your help will be appreciated.

    Thanks for your prompt response, I thought of doing this but the requirement does not want each item to be validated. Moreover, one items is based on hierachical tree (Htree) and there is go block in when_mouse_double_clicked trigger and when I set the validation unit to default or Item, this trigger did not work because of the Go_BLOCK command

  • How to create a tree structure using list items(tlist)

    HI every one,
    As we know how to create a tree structure using Hierarchy item type.
    We have a requirement to create The same tree like structure using List Item(Tlist)
    I would be so appreciated If you send with an example
    Thanks
    RangaReddy

    Hi all
    Any one help me please
    Actually our client requirement is creation of tree structure using list item,similar to what we used in oracle Application(FNDSCSGN) form.We did the tree structure using hierarchy tree using Htree and Ftree.It working excelently.For client requirement, we want to use list item.How PJC(Pluggable Java Components) is useful for using list item(Tlist).I can't understand how it is useful.
    Do you have any example please help me.
    Thanks
    RangaReddy

  • Datatypes and names of columns of recordgroup during run-time

    Hi everyone,
    Can you please tell me that Is it possible to get the datatype and name of columns of a recordgroup during run-time or not. So that I don't waste my time in searching for this solution. If you are not getting my question then please let me know but I need this help very badly.
    Thanks
    Subodh

    After  the call of the methods GET_COLUMN_WIDTH or  GET_ROW_HEIGHT
    You need to add this command :
                            CALL METHOD cl_gui_cfw=>flush.
    This will send back from the SAPGUI  to your ABAP program the new values.
    Found in this Thread  : Method GET_ROW_HEIGHT
    Eric

  • How do drag and drop in htree?

    i would like to drag and drop node in tree look like Object Navigator in
    Oracle Form Developer 6i.

    Hi jimbo7,
    Is this through the Google Calendar web interface, or are you subscribed to the calendar in the Calendar application?
    If it is the webpage, I have recently released an application that may help.  Multi Event Filter is designed to take dates as text from any source (text of email, CSV or spreadsheet, webpage, text file) and quickly and easily creates events in Calendar. The application is $2.99 to buy on Apple's Mac App Store.  You can see more information about it on my website.
    On the other hand, if you are subscribing to the calendar in Calendar you should be able to copy the event in Calendar, change the active calendar to the one you want the event in and paste.
    Best wishes
    John M
    As I sell software on my site and ask for donations, the Apple Discussions Use Agreement requires that I state that I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Error 7343 when delete a recordin database and hierarchical tree

    I got this error after delete a record and call the procedure to refresh the hierarchical tree.
    This is my code:
    PROCEDURE LOAD_TREE IS
    htree ITEM;
    rg_id RecordGroup;
    errcode number;
    BEGIN
    rg_id := find_group('RECORD_GROUP_POPULA_TREE');
    errcode := populate_group(rg_id);
    -- Find the tree itself.
    htree := Find_Item('HIERARCHICAL_TREE.TREE');
    -- Populate the tree with data.
    Ftree.Set_Tree_Property(htree, Ftree.RECORD_GROUP, rg_id);
    END;
    I put a code at the trigger KEY-COMMIT to refresh the hierarchical tree always the button F10 is pressed. Look:
    begin
    commit;
    LOAD_TREE;
    end;
    When I insert records that´s ok...the problem is when I delete records.
    Thanks!
    Sabrina

    I found the solution after read this thread: Hierachical tree delete node
    Thanks
    Sabrina

  • Calling a form on HTree Node Click

    i need a help on calling a form on HTree Node Click.
    the details as follows
    ### THIS IS MY TABLE ###
    SQL> DESC MENU_OPTION
    Name Null? Type
    NAME_CODE NOT NULL VARCHAR2(20)
    OPTION_NAME NOT NULL VARCHAR2(50)
    LINK_NAME_CODE NOT NULL VARCHAR2(20)
    MAIN_OPTION VARCHAR2(20)
    DATAID NOT NULL NUMBER
    FORM_NAME VARCHAR2(50)
    ### THIS IS MY TREE ###
    DECLARE
    htree ITEM;
    v_ignore NUMBER;
    rg_emps RECORDGROUP;
    BEGIN
    htree := Find_Item('tree_block.htree4');
    rg_emps := Find_Group('emps');
    IF NOT Id_Null(rg_emps) THEN
    DELETE_GROUP(rg_emps);
    END IF;
    rg_emps := Create_Group_From_Query('rg_emps',
    'select -1, level, OPTION_NAME, NULL, to_char(NAME_CODE) ' ||
    'from MENU_OPTION '||'connect by prior NAME_CODE = LINK_NAME_CODE '||
    'start with MAIN_OPTION = ''TOP_MENU''');
    v_ignore := Populate_Group(rg_emps);
    Ftree.Set_Tree_Property(htree, Ftree.RECORD_GROUP, rg_emps);
    END;
    ### WHAT I WANT IS ####
    The Tree is working fine
    when i click on the node i want to call_form where
    FORM_NAME matches with the OPTION_NAME
    I Tried below code.. but i don't know how to call_form
    WHEN-TREE-NODE-ACTIVATED
    Declare
    LN$I Pls_integer ;
    LC$Node Varchar2(60);
    Begin     
    IF :SYSTEM.TRIGGER_NODE_SELECTED = 'TRUE' THEN
         LC$Node := FTREE.GET_TREE_NODE_PROPERTY('TREE_BLOCK.HTREE4', :SYSTEM.TRIGGER_NODE, FTREE.NODE_VALUE);
    -- how to call the form????? .....
    End if ;
    End;
    Anyone can help

    Dear Sis,
    I'm posting the code again
    ### THIS IS MY TABLE ###
    SQL> DESC MENU_OPTION
    Name Null? Type
    NAME_CODE        NOT NULL VARCHAR2(20)
    OPTION_NAME      NOT NULL VARCHAR2(50)
    LINK_NAME_CODE   NOT NULL VARCHAR2(20)
    MAIN_OPTION               VARCHAR2(20)
    DATAID           NOT NULL NUMBER
    FORM_NAME                 VARCHAR2(50)### THIS IS MY TREE ###
    DECLARE
    htree ITEM;
    v_ignore NUMBER;
    rg_emps RECORDGROUP;
    BEGIN
    htree := Find_Item('tree_block.htree4');
    rg_emps := Find_Group('emps');
    IF NOT Id_Null(rg_emps) THEN
    DELETE_GROUP(rg_emps);
    END IF;
    rg_emps := Create_Group_From_Query('rg_emps',
    'select -1, level, OPTION_NAME, NULL, to_char(NAME_CODE) ' ||
    'from MENU_OPTION '||'connect by prior NAME_CODE = LINK_NAME_CODE '||
    'start with MAIN_OPTION = ''TOP_MENU''');
    v_ignore := Populate_Group(rg_emps);
    Ftree.Set_Tree_Property(htree, Ftree.RECORD_GROUP, rg_emps);
    END;### WHAT I WANT IS ####
    The Tree is working fine
    when i click on the node i want to call_form where
    FORM_NAME matches with the OPTION_NAME
    I Tried below code.. but i don't know how to call_form
    WHEN-TREE-NODE-ACTIVATED
    Declare
    LN$I Pls_integer ;
    LC$Node Varchar2(60);
    Begin
    IF :SYSTEM.TRIGGER_NODE_SELECTED = 'TRUE' THEN
    LC$Node := FTREE.GET_TREE_NODE_PROPERTY('TREE_BLOCK.HTREE4', :SYSTEM.TRIGGER_NODE, FTREE.NODE_VALUE);
    -- how to call the form????? .....
    End if ;
    End;

  • How to get datatype and label of columns in a record group

    Hi all,
    I need to create a generic block which displays data of any query. For this, I was thinking at runtime I'll create a recordgroup. For this I was hoping to get the datatypes and label of various columns in the records.
    Please help me in this regard
    Thanks

    Hi everyone,
    Can you please tell me that Is it possible to get the datatype and name of columns of a recordgroup during run-time or not. So that I don't waste my time in searching for this solution. If you are not getting my question then please let me know but I need this help very badly.
    Thanks
    Subodh

  • How are listbox and radiobutton items working in oracle forms?!?

    Hi all.
    I need some help over may be a standard case in every real project.
    Imagine i have a db table PERSONS -> PERSONID, NAME, TOWNID, MATRIALSTATUSID
    and table TOWNS -> TOWNID, TOWNNAME
    and table MATRIALSTATUS -> MATRIALSTATUSID, NAME
    And i have a standard oracle form with text item person name, listbox item with many towns (from TOWNS table) and the town of the concrete person is selected when the form is inited, after that we can change it by selecting other town and saving it to db.
    The same is with matrial status but lets make it as radio group with 3 buttons married, not merried, divorced.
    So my questions is how to populate the listbox(radiogroup) for 1 person by selecting data from other preferenced tables. And most important how this data is populated in the list box for example i.e. every town name is indexed in some way or what. I am a java developer and for example in java the control listbox item has two attributes the name(string) that is displayed in the listbox and a index binded for that name, and i work with indexes and show strings. I read about LOV but couldn't understand how to "index" the populated values. Is it possible.
    And please can you give me some example of how to load (populate + set current town), change and (if it is possible) "index". The same case appears to be valid with radio buttons and check boxes.
    You could give me some tutorials too, i cant find simple and focused on the problem examples.
    Thank you.
    Best Regards.

    Hi,
    well here is what i done for now.
    First I created recordGroup with query SELECT GENDER, GENDERID FROM GENDERS (I want to select all genders and place them in listbox)
    After that i created Listbox and on triger when-new-form i placed this code:
    DECLARE
    it ITEM:=FIND_ITEM('PERSONS_DETAILS.GENDER');
    BEGIN
    CLEAR_LIST(it);
    POPULATE_LIST(it, 'RG_LIST');
    DEFAULT_VALUE(NULL, 'GLOBAL.PERSONID');
    IF :GLOBAL.PERSONID IS NOT NULL THEN
    SET_BLOCK_PROPERTY('PERSONS_DETAILS', ONETIME_WHERE, 'PERSONID=' || :GLOBAL.PERSONID);
    GO_BLOCK('PERSONS_DETAILS');
    EXECUTE_QUERY;
    :GLOBAL.PERSONID:=NULL;
    END IF;
    END;
    Imagine i have a main form PERSONS that displays general information about many persons (the data is retrieved from PERSONS db table). The form PERSONS displays PERSONID, PERSON FIRSTNAME and PERSON LASTNAME. When a user double click on some row from the PERSONS FORM( i have tabular datablock that displays the person data) other form 'PERSONS_DETAILS' must be displayed with detailed information about the selected person. The data about the selected person is loaded well but i want gender to be listbox and the user can change it if he wants. So i have TABLE GENDERS 1:N with PERSONS and the table has GENDERID AND GENDER. When the user double clicks on single person i must populate the list with all possible genders from the GENDERS table and set the gender of the selected person. How to do that?
    P.S.: The example with gender is not very good because it could be only male female, but don't worry about it. You may think about gender list as townlist :)
    It finds me the GENDER LIST and populates it. After that i take the personId (that is global variable and comes from previous form) and displays all the data for the person with id personid.
    When i compile the form it gives me :
    FRM-30351: No list elements defined for list item.
    List GENDER
    Edited by: user9536806 on Nov 19, 2008 3:01 AM

  • Using bind variables in creating new recordgroup

    hi
    i am creating a new recordgroup and assigning it to the LOV using forms personalization in new item instance trigger .
    when i use the bind variables in the record group query i am getting errored out. if i remove the bind variables in the query then RG is creating and is assigned to the LOV and i can use it.
    can anyone help me how to refer the values from the exising form to build a dynamic record group query.

    Can you please send me the code you used in Forms Personalization to create new RecordGroup and attach it to an item. my mail id is [email protected]

  • Problems with Listobject based on a recordgroup

    Hi all,
    I have three problems with a Listobject (popup-_list) showing the records of a recordgroup.
    The recordgrroup is created programatically in the WHEN_NEW_FORM_INSTANCE-Trigger of the form. It shall be the source of a ListObject. The values of the recordGrpoup and therfore also of the Listobject depends on the values of an master-datablock. Changing the values of the masterblock, the recordgroup must be requeried and the listobject must be repopulated.
    1. When opening the form, the masterblock is empty. Same I want to have the listObject empty. An empty recordGroup seems not to be applied to the ListObject. Is there any possibility?
    2. My sql-statement of the recordgroup works with a global variable like so:
    :global.grpartid := '1004';
    group_id := create_group_from_query
    ('grpLagorte', 'SELECT evm_a_lagort.bez, evm_a_lagort.lagort_id from evm.evm_a_lagort, evm.evm_n2m_artikel_lagort where EVM_n2m_artikel_lagort.H_MANDANT = m.EVM_A_lagort.H_MANDANT AND evm.EVM_n2m_artikel_lagort.lagort_ID = evm.EVM_A_lagort.lagort_ID and evm.evm_n2m_artikel_lagort.artikel_id = ''' ||:global.grpartid||'''');
    I would prefer to replace the global variable with an item from my master datablock, but that seems not to work.
    3. I have to requery the group and repopulate the list when changing the master-data.
    declare     
    status                NUMBER;
         list_item          item := find_item('evm_jn_a_l.lst_lagort');
    begin
    :global.grpartid := :evm_a_artikel.artikel_id;
    status := populate_group('grpLagorte');
    message ('Status: ' || status);
    message ('artikel_id: ' || :evm_a_artikel.artikel_id);
    message ('Global: ' || :global.grpartid);
    if status = 0 then
         populate_list(list_item, 'grpLagorte');
    else
         message('Fehler bei Abfrage der Datensatzgruppe');
    end if;     
    end;
    The messages show the right values
    status = 0
    artikel_id = the choosen next one
    global.grpartid = the next artikel_id
    The content of the Listobjet does not change.
    Its a problem of the recordgroup (How can I figure that out?) or its a problem of the listObject or anything else?
    Help would be very appreciated and the problem is a bit urgent.
    Thanks
    Silke

    Silke,
    I may not have the answer to all of your questions.
    1. If you do a clear_list on the list item and, prior to this, assign it a null value. Does this work, assuming you didn't set the "other" property ?
    2. What if you do
    _artikelId varchar2(100);
    _artikelId:= :block.item;
    group_id := create_group_from_query
    ('grpLagorte', 'SELECT evm_a_lagort.bez, evm_a_lagort.lagort_id from evm.evm_a_lagort, evm.evm_n2m_artikel_lagort where EVM_n2m_artikel_lagort.H_MANDANT = m.EVM_A_lagort.H_MANDANT AND evm.EVM_n2m_artikel_lagort.lagort_ID = evm.EVM_A_lagort.lagort_ID and evm.evm_n2m_artikel_lagort.artikel_id = ''' ||_artikelId||'''');
    You should be able to do the same using global variables, in case you need it to be global
    3. I don't see whats wrong with the list, maybe you can try to do a clear_list before repopulating it. If this doesn't help try the "magic bullet" and call
    synchronize;
    after populating the list. I checked if there is a bug filed on this issue for Forms 6i (I remember that you are using Forms 6i) but there is none. So the component should be fine.
    Frank

  • How to create button programmatically and assign trigger for it and add code

    is that possible ?
    How can I create item a button for example programmatically (at run time)
    and create trigger (when-button-pressed) programmatically and write a code
    in the trigger body as well programmatically.
    thankx

    Hello David
    I used the way list and go button which is more safer than creating buttons because
    you can populate the list on fly.
         | dropdown list     \/
              | go button |
    PROCEDURE populate_user_function_list IS
         rg_list_id RECORDGROUP;
         ret_code     NUMBER;
    BEGIN
         rg_list_id := FIND_GROUP('RG_LIST');
         IF NOT ID_NULL(rg_list_id) THEN
              DELETE_GROUP(rg_list_id);
         END IF;
         rg_list_id := CREATE_GROUP_FROM_QUERY('RG_LIST','SELECT FUNCTION_ID, FUNCTION_ID FROM SMS_ROLE_FUNCTION WHERE SMS_ROLE_FUNCTION.DB_ROLE ='||''''||:GLOBAL.USER_ROLE||''''||' ORDER BY SEQUENCE_NO');
         ret_code := POPULATE_GROUP(rg_list_id);
         --Populate record group.
              IF ret_code <> 0 THEN
              bell;
              MESSAGE('Record Group could not be populated');
              RAISE FORM_TRIGGER_FAILURE;
              END IF;
         POPULATE_LIST('DYNAMIC_BLK.USER_FUNCTION','RG_LIST');
         DELETE_GROUP(rg_list_id);
    END;
    --this is the button to go the user selection
    begin
         if :DYNAMIC_BLK.USER_FUNCTION is not null then
              --go to selected form
              call_form(:DYNAMIC_BLK.USER_FUNCTION,NO_HIDE,DO_REPLACE,NO_QUERY_ONLY,NO_SHARE_LIBRARY_DATA);     
         else
              bell;
              message('Please select a function');
         end if;
    end;

  • Htree-Value of the parent's selected node

    Hi all!
    I have an htree in oracle forms10g and I would like to have the value of the parent selected node. There is a function to trap the value of the selected node but I also need the parent's value too.
    My tree is structured like this
    company--> department--> service-->service_status.
    the service_status can be active or no_active. If I click on let's say "active"
    I would like to have all the records where service_status is equal to "active" for the service located above the "active" selected

    I would like to have all the records where service_status is equal to "active"
    for the service located above the "active" selectedI'm not sure what you mean by that, but try "ftree.get_tree_node_parent(my_tree, my_node);" for getting the parent.

  • Find a specific record in a recordgroup

    I am building a recordgroup at runtime of IDNum and Name. (Basically key-value pairs)
    I'm able to build the recordgroup. But how do I find a specific record to get a Name value if I have an IDNum?
    I know I can just do this with a temp table, but I was trying to do it this way....

    Hello,
    Use the Get_Group_Record_Number() to retrieve the desired row in the record group (see the on-line documentation).
    Francois

Maybe you are looking for

  • How to Manage the Resource Master in Primavera Enterprise Version

    We are using P6 enterprise version in our company having a central database. We had created our own unique resources and standardised across the enterprise and is Admin protected. However we often have to import some schedules sent by our consultant/

  • Is there a way to use Stage3D in Flex Mobile projects on iPad?

    When I create a project of type "Action Script Mobile Project" the Stage3D works on iPad, Android device and in the AIR desktop simulator. But when I create a project of type "Flex Mobile Project" it works in the desktop simulator and on Android devi

  • How to do mapping using badis?

    Hi Experts, Can any one tell me how to do mapping using badis. Ex : this is for in IF_DP_WTY_UI_FIELD_MAPPING~CLAIM_HEADER_DATA_IN this is out -  IF_DP_WTY_UI_FIELD_MAPPING~CLAIM_HEADER_DATA_OUT. any one have any idea how to use these methods in webd

  • Manual removal of iMovie - then can't reinstall

    Needing to make more room on the main drive I manually removed iMovieHD. Wanting to reinstall it i could see no way except to reinstall the whole OSX Tiger. But iMovie did not re-appear !! Was it because it wasn't there at re-install time so it only

  • Photoshop has problem with .JPEG decoding ??

    There seems to be an issue with either JPEG decoding in Photoshop or the blend modes don't work as they should. Or maybe someone finds the true reason ... ? Let's go step-by-step: This is the original image file (JPEG): This is the same image convert