List item populate

hello all,
Am newbie to using Oracle forms 6i i have 3 list items namely CITY_NAME, STATE_NAME ,COUNTRY_NAME and i want to display city_name depending on state_name and display state_name depending on country_name... help me

user13792460 wrote:
hello all,
Am newbie to using Oracle forms 6i i have 3 list items namely CITY_NAME, STATE_NAME ,COUNTRY_NAME and i want to display city_name depending on state_name and display state_name depending on country_name... help meHi
Pls Study and try the following link...
http://andreas.weiden.orcl.over-blog.de/article-28957008.html
Hope it helps...
Regards,
Abdetu...

Similar Messages

  • SET element of LIST ITEM

    Hi,
    I have a List Item on my form in which I am populating data in tree format...and that list item populates the data based on a check box value...my form is like this
    Account # : ___________
    Description : ____________________________
    [ X ] Sub Account of : __________________(<------ this is my List item (Pop item)
    and when user selects the value it returns the code and save it on COMMIT;
    now my problem is whenever I do the execute_query the list box element doesnt set accordingly ...hummm. let me explain this way...i have accounts like this
    10000 - Assets
    11000 Current Asset
    11101 Cash in hand
    11102 Petty Cash
    12000 Fixed Assett
    12100 Building
    12101 Building # 1
    now if am creating a sub account I will fill my form like this
    Account # : 11101
    Description : Cash in hand
    [ X ] Sub Account of : __________________(<------ this is my List item (Pop item)
    now if i want a sub account I fill this pop list and it appeared like this
    --------------------------------------------------------------------------+
    10000 - Assets |
    11000 Current Asset |
    11101 Cash in hand |
    11102 Petty Cash |
    12000 Fixed Assett |
    12100 Building |
    12101 Building # 1 |
    -------------------------------------------------------------------------+
    suppose I select 11000 - Current Asset (make it parent account) from the list and
    in the pop list this entry remains there...now after commit and clear_block it clears the block and ready for a new record...
    My question is that when I execute the query all the values comes exactly but the list item perticular element should also be set accordingly ..how can I set the list item element according to the rest.
    Hope I am describing my problem well otherwise plz ask me again.

    as the list item is a control item, it won't be auto-queried while executing query on the base table block. what you can do is, write the post-query trigger to assign the value of parent_account (sub_account_of) to this list item.
    hope it helps.

  • Populating List Item From View

    I have two data blocks in my form, one named USERS which contains updateable fields to a table from the view and another data block called CONTROL which are all list items that currently populate on a WHEN-MOUSE-CLICK trigger. The list items work as expected for the WHEN-MOUSE-CLICK trigger. However, my problem is trying to populate the list items based on a selection previously chosen and saved to the table (yes, the values are in the table and are selectable through the view). I have a seperate population for this occurrance in the WHEN-NEW-FORM-INSTANCE at the form level, as well as on KEY-SCRUP, KEY-SCRDOWN, WHEN-NEW-RECORD-INSTANCE, and POST-QUERY at the USERS data block level. The only way the list items populate on a previously chosen and saved value is if you choose (WHEN-MOUSE-CLICK trigger) the list of values and save. From then on, as I scroll through the data retrieved in the USERS data block the corresponding data in the users view shows up in the CONTROL block list items. How do I get my form to initially show the corresponding list item data on form load when it is already in a WHEN-NEW-FORM-INSTANCE and POST-QUERY trigger on form load?
    Thanks in advance for any clue to point me in the right direction.
    Kyle
    Edited by: Kyle Miller on Sep 29, 2008 3:09 PM

    The form is for editing a current student information system user who we will be extracting data for an OBIEE IDM import. All of the fields displayed in the OBIEE_USERS data block can be edited. For the CONTROL block list items I would like them to display the current value chosen for the user displayed in the OBIEE_USERS data block. When the CONTROL block list items are clicked on then a list of values are displayed in which the logged in form user can chose another value which ultimately changes the choice for the user displayed in the OBIEE_USERS data block. This all works fine in my current form except the list items do not display the current user selected in the OBIEE_USERS data block's saved value until the list item is selected, a value chosen, and a save is committed to the table tied to the OBIEE_USERS data block. From that point I can scroll through the OBIEE_USERS block and the list item displays the correct value for the selected user, if there are values (some users have NULL values). I have currently worked around this issue by displaying the fields in the OBIEE_USERS block and only use the list items for the changing selection. I did this because I needed a proof of concept for the pilot roll-out and could no longer wait to figure this issue out (it should be more simple it seems). I am still interested in resolving this as I feel it is a great functionality for the form.

  • Unable to populate list items with criteria

    Hi
    I want to populate some values based on condition in a text field.
    I tried the code wihtout condition in new form instance and its working fine but when i tried with an condition on when mouse click on list item and its working for first action.If list having more than 1 values in list its became blank and not working
    DECLARE
    group_name varchar2(40) :='LSTCUR';
    group_id RecordGroup;
    list_id item := Find_item('TB.LSTCUR');
    status NUMBER;
    begin
    IF Id_null(group_id) THEN
    group_id := Create_Group_From_Query('LSTCUR','select distinct curr,curr from REC_CURR_V where br =:TB.PSRCH');
    END IF;
    Clear_list(list_id);
    status := Populate_Group('LSTCUR');
    Populate_list(list_id,group_id);
    end;
    rgds
    soumya

    soumya,
    Try this code.
    DECLARE
         RG_Group_ID RECORDGROUP;
         Num_Status NUMBER;
    BEGIN
         RG_Group_ID := FIND_GROUP('LSTCUR');
      IF NOT Id_Null(RG_Group_ID) THEN
              DELETE_GROUP(RG_Group_ID);
      END IF;
         RG_Group_ID := CREATE_GROUP_FROM_QUERY('LSTCUR', 'SELECT DISTINCT CURR, CURR FROM REC_CURR_V WHERE BR = ''' || :TB.PSRCH || '''');
         CLEAR_LIST('TB.LSTCUR');
         Num_Status := POPULATE_GROUP('LSTCUR');
         POPULATE_LIST('TB.LSTCUR', RG_Group_ID);
    END;Regards,
    Manu.
    If my response or the response of another was helpful, please mark it accordingly

  • How to populate List Item from the table in a form builder

    I want to know how to populate the List Item (pop up menu and combo box) from a table.
    Supposing I have a table Customer(cust_id,cust_name)
    and now I want to populate it in such a manner that I can update the data back to the database and also access the list on the form.

    This is the method i am using to populate a list.
    1- First of all you need to create a non-database list item for customer_name.
    2-create this procedure
    PROCEDURE populate_list_with_query
    --Populates the given list item with the specified query.
    (p_list_item in VARCHAR2
    ,p_query in VARCHAR2)
    IS
    /* Name the record group after the list item (no
    block prefix). */
    cst_rg_name constant VARCHAR2(30) :=
    GET_ITEM_PROPERTY(p_list_item,item_name);
    v_rg_id RECORDGROUP;
    BEGIN
    v_rg_id := FIND_GROUP(cst_rg_name);
    IF ID_NULL(v_rg_id) THEN
    v_rg_id := CREATE_GROUP_FROM_QUERY(cst_rg_name,p_query);
    END IF;
    IF POPULATE_GROUP(v_rg_id) = 0 THEN
    POPULATE_LIST(p_list_item,v_rg_id);
    /* Force display of first list element label
    in the list item. */
    COPY(GET_LIST_ELEMENT_VALUE(p_list_item,1),p_list_item);
    END IF;
    END populate_list_with_query;
    3- Create When-Create-Record on the block level and write this code
    BEGIN
    POPULATE_LIST_WITH_QUERY('bk1.customer_name',
    'SELECT customer_name, to_char(customer_id) FROM customer');
    END;
    In this example, the customer name is the (visible) list label and the customer ID is the (actual) list value
    i hope this will solve your problem ...

  • How to populate multiple list items dynamically?

    Dear members,
    I have a form there are 3 list items i want to populate these from a record group by dynamically.
    but i can be able to populate only one list item. the others give errors.
    frm-41337 cannot populate the list from record group.
    following is the program unit:
    PROCEDURE POPULATE_LIST_WITH_QUERY
         (p_list_item in varchar2,
         p_query in varchar2)
    IS
         cst_rg_name constant varchar2(30) :=
              GET_ITEM_PROPERTY(p_list_item,item_name);
         v_rg_id RECORDGROUP;
    BEGIN
         v_rg_id := FIND_GROUP(cst_rg_name);
         if id_null(v_rg_id) then
              v_rg_id := create_group_from_query(cst_rg_name, p_query);
         end if;
         if populate_group(v_rg_id) =0 then
              populate_list(p_list_item, v_rg_id);
              copy(get_list_element_value(p_list_item,1),p_list_item);
         end if;
    END;
    i call this in the when-create-record
    populate_list_with_query('gl_users.location_id',
    'select location_name, to_char(location_id) from gl_locations');
    populate_list_with_query('gl_users.company_id',
    'select company_name, to_char(company_id) from gl_company');
    populate_list_with_query('gl_users.group_id',
    'select group_name, to_char(group_id) from gl_user_groups');
    only one is populated others give errors.
    what is wrong?
    thanks
    Muhammad Nadeem
    Oracle Programmer
    CHIMERA
    Lahore
    0092-0301-8334434

    Hi again,
    Did the popup work ?
    For the list item , use the built-in add_list_element in a loop. Example : in the pre-form or when-new-form-instance trigger ,
    clear_list('block_name.list_item_name');
    for rec in (select column1,column2 from t_table order by 1 desc) loop
    ADD_LIST_ELEMENT('block_name.list_item_name', 1, rec.column1, rec.column2);
    end loop;
    See you

  • Populate a non List ITEM

    I am familiar with the procedure of creating a record group to pupulate a list item. What I have never done and I am wondering how to do it is for when you want to populate a text item for display only. List is not necesary as the data has already been entered.
    any ideas?
    thanks!
    here is the scenario
    I have one table with:
    education --numeric 1 to 5 possible values
    in another table, I have the labels for this
    id | label | type
    1 elementary 1
    2 highschool 1
    3 college 1

    I believe you need a LOV. You have a display item which would hold the value of a chosen element. The values are, I believe, in a table already. You need to define a RG( based on a query retrieving values from the existent table) and base a LOV on this RG. In the when new item instance invoke the LOV. Assign the value chosen in the LOV to the display item (set the return item to the display item in the Column mapping property of the LOV).
    I hope this helps.
    Thanks

  • Populate list Item with a recordgroup?

    Hi Friend
    I want to populate a list Item with a "Recordgroup". Does it possible without using the add_eliment function?
    I did it through the Loop to read the item from record group. If the database changes the record does not change in my list item. because the list containing the added items which was delivered in the load time. But like Pressing F9, we can easily see the last changed data of the database.
    If possible please send me the detail code to me. Here I delivered the detail procedure which i did for that purpose.
    Farhad
    ==========================================================
    PROCEDURE Populate_Item_In_List (     List_name VARCHAR2,
                                                                                         QUERY_Text VARCHAR2,
                                                                                         rg_Level_Col_name VARCHAR2,
                                                                                         rg_Value_Col_name VARCHAR2) IS
         HERE THE PROCEDURE POPULATE THE LIST WITH THE REQUIRED DATA UNDER A CORRCET SQL (SELECT) COMMAND
         List_name                     THE LIST ITEM WHICH HAS TO BE LOADED BY THIS PROCEDURE
         QUERY_Text                     THIS CONTAINS THE QUERY TEXT BY WHICH THE LIST ITEM WILL LOAD
         rg_Level_Col_name THIS IS THE LEVEL OF THE REQUIRED ITEM THAT OBVIUSLY A CHAR DATA TO BE RETRIVE
         rg_Value_Col_name THIS IS THE VALUE OF THE REQUIRED ITEM THAT OBVIUSLY A NUMBER DATA TO BE RETRIVE
                   R_Group          RecordGroup;
                   Rowcount      NUMBER;
                   rg_name      VARCHAR2(40) := 'DefaultRG';
                   rg_id      RecordGroup;
                   errcode      NUMBER;
                   Lid                    Item;
    BEGIN
         --+++++++++++++++++++++THIS IS USED TO POPULATE THE RECORD GROUP+++++++++++++++++++++++++++++++++
                   rg_id := Find_Group(rg_name);                                             Find the record group                                                   +
                                                      --+
                   IF Id_Null(rg_id) THEN                                                                                                                                                                          --+
                             rg_id := Create_Group_From_Query(rg_name,Query_Text);                                                                                     --+
                             errcode := Populate_Group(rg_id);                                                                                                                                       --+
                   else                                                                                                                                                                                                                       --+
                             errcode := Populate_Group_With_Query(rg_id,Query_Text);                                                                            --+
                   END IF;                                                                                                                                                                                                                  --+
         --+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     
              If errcode = 1403 then
                   Message('There is no data to be retrive......');
              else
         --+++++++++++++++++++++THIS IS USED FOR LOADING DATA TO THE LIST ITEM++++++++++++++++++++++++++++
                   Rowcount      :=      Get_Group_Row_Count(rg_id);                              Counting the total rows in RGroup          +
                   Lid                    :=     Find_Item(List_name);                                                                                                                                            --+
                   Clear_list(Lid);                                                                                          Clear the list which is loaded now     +
                   FOR J IN 1..Rowcount LOOP                                                                                                                                                                     --+
         Add_List_Element(List_name,                                                            the name of the list item                              +
                                                      J,                                                                                index of the list                                                  +
                                                      Get_Group_Char_Cell('DefaultRG.'||rg_Level_Col_name,j),     Level of item+
                                                      Get_Group_Number_Cell('DefaultRG.'||rg_Value_Col_name,j) value of item+
                                                      );                                                                                                                                                                               --+
                   END LOOP;                                                                                                                                                                                                             --+
         --+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
              end if;
    END;
    ===============================================================

    Hi Farhad,
    You can make use of Populate_List built-in.
    Populate_List(list_id, 'RECGRP');
    You can find more information in online documentation of forms.
    Cheers
    Zakiy

  • Populate HTML LIST ITEM with a query

    Hello,
    I've a problem,
    I'm building a portlet based on an html form.
    In this forms there are several list items,
    How can I populate an html list item with a dynamic query based on a db table?

    I hope you are looking for something like this
    declare
    v_ret_string varchar2(32767);
    begin
    v_ret_string := ' <TABLE BORDER="1" bordercolor="#0000FF" bgcolor="#FFFFF0">
                   <TR><TD><TABLE BORDER="0" CELLSPACING="3" CELLPADDING="0">
                   <BR>
                        <TR><TD ALIGN=middle><SELECT SIZE="1" NAME="emp_list">
                             <OPTION VALUE="">';
    For get_emp_list In (Select ENAME,EMPNO
    From SCOTT.EMP
              Order by ENAME) Loop
    v_ret_string := v_ret_string || '<OPTION VALUE="'||get_emp_list.EMPNO||'">'||get_emp_list.ENAME;
    End Loop;
    v_ret_string := '</SELECT></TD></TR><TABLE></TABLE>';
    End;
    which uses PL/SQL code to generate the html page.
    Thanks
    -Krishnamurthy

  • How to Populate a List item with LOV'S

    How to Populate a list of items with Lov's
    and then how to dynamically change the Values of one LIST Item
    Based on the Value of anothe List item

    976798 wrote:
    --Hello..I want to ask that How to bind a list item with  table values? this below code does not populate items from database to list item.Pls any body give me solution.
    declare
         group_id RecordGroup;
         list_id Item:=Find_Item('LST_CLASS');
         status number;
    begin
         group_id:=Create_Group_From_Query('Answer_List','select CLASS_ID,CLASS_NM from CLASS_MSTR');
         status:=Populate_Group('Answer_List');
         message(to_char(status));
         Populate_List(list_id,group_id);
         end;Welcome to the Oracle Forums. Please take a few minutes to review the following:
    <ul>
    <li>Oracle Forums FAQ
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>How to ask questions the smart way
    </ul>
    Following these simple guidelines will ensure you have a positive experience in any forum; not just this one!
    Check this link: How to Dynamically Populate a Pop List ?
    Hope this helps
    Hamid
    If someone's response is helpful or correct, please mark it accordingly.

  • How to populate a list item...

    Hi Guys,
    i have created one of the field on my form as List Item. Now i want to populate this Item with some values in a table.
    I have a base table with
    Country_ID and Country_Name fields.
    I want to populate my List Item on the form in such a style that it just display Country_name in the list, while Country_ID is saved in the database.
    The datatype of the field on my form is NUMBER.
    How can i populate my list item with a values selected from a database table, description is displyed while code is to be save?
    Pliz help,
    Imran Baig

    >
    Hi Guys,
    i have created one of the field on my form as List
    Item. Now i want to populate this Item with some
    values in a table.
    I have a base table with
    Country_ID and Country_Name fields.
    I want to populate my List Item on the form in such a
    style that it just display Country_name in the list,
    while Country_ID is saved in the database.
    The datatype of the field on my form is NUMBER.
    How can i populate my list item with a values
    selected from a database table, description is
    displyed while code is to be save?
    Pliz help,
    Imran Baighi
    my question is how is the county id value assigned hidden field to be saved to the database.
    secondly the reply states populate list(lstitem,grp_county) my question is which field are you populating here - the display value the country name or the county id to be saved in the database.
    most of the notes says you have to create a value twice. one for label and one for value, how is this applicable to be above case.
    i have a record group -
    SELECT site_abbrev,TO_CHAR(site_code)
    FROM sgr_site_list with 2 fields x_site not displayed but receives the site code and save to the database, the other x_site_abbrev displayed and receives site_abbrev but not saved to the database. this is the trigger i have written
    declare
    site_grp recordgroup := find_group('site_grp');
    i_list_item item := find_item('control.x_site_abbrev');
    status varchar2(80);
    begin
    status := populate_group(site_grp);
    CLEAR_LIST(i_list_item);
    POPULATE_LIST(i_list_item,site_grp);
    but i get the form error 40176 cannot create list ...
    can someone help please, the whole concepr is a bit confusing
    thanks

  • Populate the values  to  list item based on a check box

    Hi,
    How can i populate the values from a field on the form to one list item based on a check box,
    the pseudo code is like,
    if checkbox = checked then
    populate the particular field value to the list item;
    checkbox = unchecked;
    next_record;
    end if;
    Thanks
    Bcj

    To populate a Tlist item, do the following:
    1. Create a TLIST item in the EMP block. and give it a height to accommodate several names.
    2. Using the TLIST property pallete:
    a. Set the Column Name property to EMPNO
    b. Click on the Elements in List property. Delete each List Element and delete each List Item Value. If you don't do this you will get an error when you compile.
    3. Create a record group using this query:
    select ename, to_char(empno) from emp
    4. Create a WHEN-NEW-FORM-INSTANCE trigger, and place this code inside the trigger:
    Declare
    err_num number;
    Begin
    clear_list('YOUR_TLIST');
    err_num := populate_group('YOUR_RECORD_GROUP');
    If err_num = 0 Then
    populate_list('YOUR_TLIST', 'YOUR_RECORD_GROUP');
    Else
    message('Error populating Tlist');
    message('Error populating Tlist');
    End If;
    End;
    5. Compile and run the form. The ENAMEs will appear in the TList, and each ENAME will have a value equal to its EMPNO.

  • Is it possible to populate list item in TAB CANVAS

    Hi,
    I have two datablock first is master and second is detail (master detail block) I want to populate second datablock fields on the basis of first data block selection (second block is displayed on Tabuler or Grid like canvas) I made list item type data fields on second or Tabuler canvas(detail block) and want to populate this list at run time on WHEN-NEW-BLOCK-INSTANCE trigger, is it possible, if yes what's wrong I am doing because this list population works fine on master block
    (master block with canvas type of FORM).
    Thanks and Regards.
    Khawar
    Message was edited by:
    skhawar03

    Hi,
    Fifty percent of my problem is solved second canvas list item values now populated successfully, but another problem is that it populates when I click second time on a required button, the button and queried items are in same datablock
    the code behind the WHEN-BUTTON-PRESSED trigger button is:
    declare
         exist_chk number:= 0;
    begin
         select count(*) into exist_chk
         from incident
         where ref_no = :incident.ref_no
         and inc_type_code = :incident.inc_type_code;
         IF exist_chk <> 0
              THEN
    SET_RECORD_PROPERTY(:system.cursor_record,'INCIDENT',status,new_status);
    Set_Block_Property('INTERP_DETAIL', ONETIME_WHERE, ' WHERE ref_no ='||:incident.ref_no||' and inc_type_code='||''''||:incident.inc_type_code||'''');
    execute_query;
    else
    display_message('msgbox_stop','No Master Data','First Enter Master Record ');
         end if;
    end;

  • Want 2 populate value in 2nd list item based on value selected in 1st list?

    Want 2 populate value in 2nd list item based on value selected in 1st list?

    Gaurav -
    The 3rd list will not populate because nothing has been selected yet in list 2. The value in list 2 is null, so the loop to populate list (3) has nothing to load. Try the following below. This should seed your 2nd list so the 3rd list will populate.
    You will have to declare first_record boolean and first_value to match DESCC.
    first_record := true; -- NEW *****
    Clear_List('BLOCK2.ITEM2');
    FOR CurRec IN (SELECT UNIQUE DESCC DESCC FROM LUTT where LUTT.IDD = :BLOCK2.ITEM1)
    LOOP
    if first_record = true then -- NEW SECTION *****
    first_value := CurRec.DESCC;
    first_record := false;
    end if;
    Add_List_Element('BLOCK2.ITEM2',1,CurRec.DESCC,CurRec.DESCC);
    END LOOP;
    :block2.item2 := first_value; -- NEW *****
    Clear_List('BLOCK2.ITEM3');
    FOR CurRec2 IN (SELECT UNIQUE DESCC DESCC FROM LUTT where LUTT.DESCC = :BLOCK2.ITEM2)
    LOOP
    Add_List_Element('BLOCK2.ITEM3',2,CurRec2.DESCC,CurRec2.DESCC);
    END LOOP;
    My name is Ken, 1990 is when I started using Oracle Forms 3.0, character based in the Unix environments. And you are very welcome.

  • Populate list item dynamically

    Hi all.
    I have a problem. I must populate a list item with a select, using the add_list_element statement inside a loop, using a cursor. My problem is that I must parametrize the select of the cursor: I pass a parameter in the procedure which is a field of the select of the cursor, but I have no result. The statement is the follow
    cursor c1 is
    select distinct("name of the parameter")
    from table
    order by 1;
    When I execute this statement I have no result. Is there anyone to help me???
    Thank you all for your collaboration.

    Hi dear,
    as for as i understood your problem, you want to populate the element list with a select query and your are using cursor and add_elements for this purpose which is complex and lenghtly,
    why dont you use populate_group and populate_group_with_query built-ins instead of add_elements built in, by above mentioned two builts ins, you can populate the element list with a query and even you can refresh your element list at any time during runtime by populate_group_by_query. here is an example, you can also take benefit from forms builder help;
    in new_form_instance trigger write following code to populate a list with select query;
    DECLARE
    rg_id RecordGroup;
    errcode NUMBER;
    BEGIN
    rg_id := Create_Group_From_Query( 'LIST1_GRP','select code_name, code_no from any_table where code_name = ''0107''',FORM_SCOPE,200);
    errcode := Populate_Group( rg_id );
    Clear_List('CNOTE_TYPE');
    Populate_List('CNOTE_TYPE','ACCNO_GRP');
    end;
    user populat_group_by_query to refresh list elements after the forms is already load and elements list is already populated.
    any further question, feel free.

Maybe you are looking for

  • Visual Studio 2005 - Display images in Crystal Report

    I have been tyring to import an image from the HD into crystal reports. I have been failing miserably. I have researched the web and the forum and tired the approaches and still no luck. I do not use a database and am using the crystal report that ca

  • Publish the query to roles ?

    HI ,   i want  to publish the query to the roles , which is on top of  multiprovider & which is  on top of INfocube . my question is , do i need to assign both multiprovider & infocube to auth object  or only multiprovider is enough ? 2) i have a RRI

  • Only Songs from Itunes don't work!

    So I've called support about this and it was fixed and was suppose to never happen again... and it did... My Ipod randomly decided to just stop playing anything i've bought from iTunes before and my videos. Plays everything else. It did it before. Su

  • Unable to send emails. ORA-24247 error

    Hi, I have an email program that isn't working and I am getting this message: ORA-24247: network access denied by access control list (ACL) Any help? Thanks.

  • Update Opportunity Totals - trigger this action

    Is there a way to trigger the Update Opportunity Totals action (so the user does not have to click on the button)?