URGENT : Record Group Problem

hello all
i have a problem regarding record group.
i want to populate my record group with a dynamic clause which is
"and main_code not in ('02725','02868')"
and my record group query is
"select mt.main_number from main_table mt,main_parent mp
where mt.main_code = mp.main_code
and mt.main_code not in (:parameter.param_main_code)"
now i am adopting the following method for populating the
LOV(list of values) which is attached to a text item:
assigning values i.e. '02725','02868' to my parameter object i.e. :parameter.param_main_code but the record group is not giving changd results according to my criteria i.e.'02725','02868'...
does any body knows the solution for this problem..kindly help him with it..logically the record group query should work and return a changed results for the LOV..
please help me with this.....
thank you.

I thing you can't able to do what you are trying to do, but you can achive this by using dynamic record group.
Create the dynamic record as same struncture of design time then populate it by the coding.
Sample Code is
declare
     l_rec_name RecordGroup;
     l_rec_col GroupColumn;
     l_rec_col1 GroupColumn;     
     cursor l_ename is select ename from emp;
     l_row number(12):= 1;
begin
     l_rec_name := create_group('rg_dynamic',Form_scope, 100);
     l_rec_col := add_group_column(l_rec_name,'ENAME',char_column,30);
     l_rec_col1 := add_group_column(l_rec_name,'EMPNO',number_column,6);     
     for i in l_ename
     loop
          add_group_row(l_rec_name, end_of_group);
set_group_char_cell(l_rec_col,l_row, i.ename);
set_group_number_cell(l_rec_col1,l_row, l_row);
l_row := l_row+1;
     end loop;
     :parameter.num_rows := l_row -1;
     set_lov_property('LOV5',group_name,'RG_DYNAMIC');
end;
I hope this will help you to solve this problem.
[email protected]

Similar Messages

  • Lov & record group problem

    Hi
    I have to achieve this task.
    I have "company_list" record group and "company_list" lov
    I am form layout style. I am in Enter-query. Then give some value to any field. Then Click execute-query. Its retreiving some records.
    Now if I click the LOV can I show only those records currently I have retreived.
    I have following trigger on button pressed.
    It is giving 1)error Populating group.2)cannot create group company_list 3) error_populating group.
    Anybody pl help me.
    Christy.
    DECLARE
    cur_blk VARCHAR2(40) := :System.Cursor_Block;
    last_qry varchar2(2000);
    bk_id Block;
    rg_name VARCHAR2(40) := 'COMPANY_LIST';
    rg_id RecordGroup;
    errcode number;
    BEGIN
    bk_id := Find_Block(cur_blk);
    last_qry := Get_Block_Property( bk_id, LAST_QUERY);
    rg_id := Find_Group('COMPANY_LIST');
    IF NOT Id_Null(rg_id) THEN
    DELETE_GROUP(rg_id);
    END IF;
    rg_id := Create_Group(rg_name);
    errcode:=Populate_Group_With_Query(rg_id,last_qry);
    end;

    I think that you have to use Create_Group_From_Query() instead of Create_Group():
    rg_id := Create_Group_From_Query(rg_name);
    Helena
    null

  • Record group problem

    hi all
    i make a record group in my form (developer 6i).
    in runtime i want to find a special record in this record group.
    what is the best way?
    thanks in advance.
    shoja

    You can loop through the members of the record group using GET_GROUP_ROW_COUNT to get the number of members and then the various get_group_..._cell built-ins to get the value of a column for each row

  • Dynamic Record Group problem

    I am trying to assign LOV to a field on 6i form programatically. Here is the procedure I created.
    PROCEDURE XXSAG_RECGROUP IS
    XXSAG_ACCOUNT_RG               RECORDGROUP;
    val                                   number;
    val_chosen               boolean;
    raise_error               exception;
    BEGIN
    if (id_null(XXSAG_ACCOUNT_RG)) then
    XXSAG_ACCOUNT_RG := Create_Group_From_Query('ACCOUNT_NUMBER','select account_number'||' from xxsag_prod_producer_info'
                   ||' where production_id = :xxsag_prod_main.production_id'
                   ||' and account_type = :xxsag_prod_producer_info.account_type ');
                   val := Populate_Group(XXSAG_ACCOUNT_RG);
                   If val != 0 then
                        delete_group(XXSAG_ACCOUNT_RG);
                        raise raise_error;
                   End If;     
                   set_lov_property('ACCOUNT_NUMBER_LIKE',GROUP_NAME,'XXSAG_ACCOUNT_RG');
                   set_item_property('XXSAG_PROD_PRODUCER_INFO.ACCOUNT_NUMBER',LOV_NAME,'ACCOUNT_NUMBER_LIKE');
                   delete_group(XXSAG_ACCOUNT_RG);
              end if;     
    END;     
    However, when the cursor goes to the field, I see the LOV toolbar but no records show up. Please help.
    Thanks.

    Please explain why you need to create the group during run-time. I don't see anything in your code that might require this.
    Are you just trying to change the contents of the LOV based on the values in production_id and account_type? I think setting Automatic Refresh to YES might do it.

  • Strange Problem in dynamically list population with record group

    Hello Room,
    I am dynamically populating a single list with 2 record groups. I am having a strange problem. All the code are written in 2 seperate buttons. The code of every button is given below.
    Button 1 code:-
    DECLARE
    rg_reports RECORDGROUP;
    rg_name VARCHAR2(40) := 'REPORTS';
    vTemp NUMBER;
    BEGIN
    -- Pls make sure Group doesn't already exist
    rg_reports := FIND_GROUP(rg_name);
    -- If it doesn't exist then create it and add ur query to it
    IF Id_Null (rg_reports) THEN
    rg_reports:=CREATE_GROUP_FROM_QUERY(rg_name , 'SELECT companyname,to_char(co) from companymaster order by companyname');
    end if;
    --Populate the Record Group
    vTemp:=POPULATE_GROUP(rg_reports);
    POPULATE_LIST('REPORTS.EXAMPLELIST', rg_name);
    Delete_Group( rg_reports );
    END;
    Button 2 Code:-
    DECLARE
    rg_reports RECORDGROUP;
    rg_name VARCHAR2(40) := 'REPORTS';
    vTemp NUMBER;
    BEGIN
    -- Pls make sure Group doesn't already exist
    rg_reports := FIND_GROUP(rg_name);
    -- If it doesn't exist then create it and add ur query to it
    IF Id_Null (rg_reports) THEN
    rg_reports:=CREATE_GROUP_FROM_QUERY(rg_name , 'SELECT accountname,to_char(co) from accountmaster order by accountname');
    end if;
    --Populate the Record Group
    vTemp:=POPULATE_GROUP(rg_reports);
    POPULATE_LIST('REPORTS.EXAMPLELIST', rg_name);
    Delete_Group( rg_reports );
    END;
    The code is same here only the sql is different in these 2 buttons. Now the problem point.
    when i press button 1, I get the list populated ok. when i try to click on the list item and keep the button pressed the list gets scrolled properly.
    when i press button 2 after that i get account names well populated in the same list item as well, but this time, when i keep the button pressed the list does not scroll below as in button 1. It does not even allow to select different item from the list of button 2 code.
    I tried to clear cache, cookies, exit browser everything and try to run the button 2 first, but still the problem in button 2 code.
    Following are my system details.
    windows 7 professional edition.
    Oracle database 11g on windows 7
    Oracle forms 10g patchset 10.1.2.0.2 on windows 7
    Browser Netscape Navigator with oracle jinitiator 1.3.1.22
    But this form is run by a client side html file where oracle forms 10g is not installed on windows xp. html file is just referring server url to run the module. The file is run on Netscape navigator browser with oracle jinitiator 1.3.1.22
    My question is that is this a bug ? if button 1 gets the list item scrolled, why is the problem with button 2 even though i press it first. Here I am deleting the record group also. after the code is over. Initially I thought this may be the character length problem so I took the maximum character length for that list item as given by the 2 columns in database.
    Why is the list scrolling not happening in button 2 but in button 1 with same codes on both ?
    Anybody please help me.

    The problem is the second query. I would guess that the TO_CHAR(co) is not unique for each account, but is the same for the accounts. And as the second item in the select-list is the listitems values, all your listitem-entries have the same value. therefore, of you select any entry, the list will always go the the first entry again.
    Adjust your query.

  • URGENT,FRM-41337: Cannot populat the list from record group

    Hi all:
    Can anyone help me in that problem?
    I have a database item in the block as a list item with combo box style and I use this code in WHEN-NEW-RECORD-INSTANCE at the form module level to populate that combo box list:
    DECLARE
         group_id RECORDGROUP := FIND_GROUP('group');
         list_id ITEM := FIND_ITEM('employees.job_id');
         x number;
    BEGIN
    IF NOT ID_NULL (group_id) THEN
              DELETE_GROUP (group_id);
         END IF;
              group_id := CREATE_GROUP_FROM_QUERY ('group','select name,TO_CHAR(id) job from cmn_jobs where job_type_id = 4720 ');
         x := POPULATE_GROUP (group_id);
         POPULATE_LIST (list_id, group_id);
         EXCEPTION
    WHEN NO_DATA_FOUND THEN
    null;
         END;
    That code worked very well and without any problem, but when I change the list item from combo box style to poplist style then the forms give that error:
    FRM-41337: Cannot populat the list from record group
    And an additional null/blanke element appears in the poplist with original element that come from RECORDGROUP.
    So can anyone help me to solve that problem please?

    First, how I can assign a default or initial value DYNAMICALLY to my poplist.Set the default-value to a parameter like :PARAMETER.MYPARAMETER then you can assign the desired default-value to the parameter.
    second, if I have popliste say X for example depend on another poplist say Y ,so when I put the code to populate popliste X on WHEN-LIST-CHANGED on popliste Y and make query then the >forms return FRM-40301 Query caused no records to be retrieved ,but when I have a copy for that code in WHEN-LIST-CHANGED and put it in WHEN-NEW-FORM-INSTANCE at the form >module the form work and returns records, so is it any error or exception in what I did.Can't answer that, you should check :SYSTEM.LAST_QUERY to see why the query does not returnany records.
    At the last, which better to put the code for popliste in PRE-FORM trigger at the form module or in WHEN-NEW-FORM-INSTANCE at the form module.I would use the PRE-FORM-trigger

  • Static record group and lov problem

    hi all,
    1)I created a form module
    2)created a basic datablock based on empno and ename from emp table.
    3) created a static record group ,where i specified the column name as col1,provided the values as 1 ,2,3,4,5 etc
    4) created an LOV and assigned the above record group to the LOV
    5) then assigned the lov to the emp.empno item in the datablock emp....
    when i run the form .....i get the list of values message on the console (bottom end of the window) ....
    but I am not able to see the LOV when i press the cntrl L or see it from the edit menu command ?
    what must be the problem ?
    ta
    s

    Dear,
    May be you don't set LOV's "Column Mapping Properties". After setting the properties correctly you will be able to display LOV.
    Thanks.

  • (urgent) Dynamic record groups and LOV

    I have to create a record group and then add 2 rows to it manually.Following is the code.There are no values displayed in the lov.Please help.
    PROCEDURE create_record_group IS
    BEGIN
    DECLARE
    rg varchar2(40) := 'test_fips';
    rg_id RECORDGROUP;
    lov_id Lov;
    err NUMBER;
    gc_id1 GROUPCOLUMN;
    gc_id2 GROUPCOLUMN;
    counter number;
    BEGIN
    rg_id := FIND_GROUP(rg);
    lov_id := FIND_LOV('LOV_FIPS');
    IF NOT ID_NULL(rg_id) THEN
    DELETE_GROUP(rg_id);
    END IF;
    IF ID_NULL(rg_id) THEN
    rg_id := CREATE_GROUP(rg);
    gc_id1 := add_group_column (rg_id,'col1',number_column);
    gc_id2 := add_group_column(rg_id,'col2',char_column,40);
    END IF;
    /* adding static content to LOV */
    ADD_GROUP_ROW( rg_id,1);
    SET_GROUP_NUMBER_CELL(gc_id1,1,997);
    SET_GROUP_CHAR_CELL(gc_id2,1,'MLAB');
    counter := get_group_row_count(rg_id);
    /* adding dynamic content */
    FOR rec in (SELECT FIPS_CD COL1, LOCNAME COL2 FROM FIPS) LOOP
    counter := counter +1 ;
    ADD_GROUP_ROW( rg_id, counter);
    SET_GROUP_NUMBER_CELL(gc_id1,counter,rec.col1);
    SET_GROUP_CHAR_CELL(gc_id2,counter,rec.col2);
    END LOOP;
    SET_LOV_PROPERTY('LOV_FIPS',GROUP_NAME, rg);
    END;
    END;

    I tried creating the group the way you suggested but it does not seem to work because of 'UNION' in the query.It says unable to create rcord group.Did you anytime use the 'UNION' option while creating record group.
    While creating record group at design time also you cannot use UNION with dual.
    This how I modified :
    PROCEDURE create_record_group IS
    BEGIN
    DECLARE
    V_RG_ID RECORDGROUP;
    RG_NAME VARCHAR2(20) := 'TEST_FIPS';
    V_ERRCODE NUMBER;
    BEGIN
    V_RG_ID := FIND_GROUP('TEST_FIPS');
    IF ID_NULL(V_RG_ID) THEN
    V_RG_ID := CREATE_GROUP_FROM_QUERY('TEST_FIPS', 'SELECT FIPS_CD, LOCNAME FROM FIPS
    UNION SELECT 997,'MLAB' FROM DUAL');
    END IF;
    V_ERRCODE := POPULATE_GROUP(V_RG_ID);
    MESSAGE('CREATED '|| V_ERRCODE);
    SET_LOV_PROPERTY('LOV_FIPS',GROUP_NAME, RG_NAME);
    END;
    END;
    Notice here 'MLAB' is char and I get compilation error if I use these quotes with MLAB.But is I remove the quotes the it compiles.
    Thanks

  • Very urgent..........how to pass a paramter list containing record group as

    hi
    can any one help me , i am getting frm-41214 when i pass a paramter list containing record group as data parameter to run_report_object as parameter, calling report from forms 10g, but when i dont pass the parameter list the report runs displaying no data(as it should do), otherwise it dont run and display the frm-41214
    zulfiqar

    Hi,
    Try using a lexical parameter(&parm_1) for a string of values or a bind parameter(:parm_1) for a single value
    Thanks,
    Kimosabe

  • Record Group Urgent

    I am trying to populate a record group at runtime. This record group is based on query.
    My SELECT statement has a where clause. To this where clause i pass a CHARACTER value in single quotes.But its show error CANNOT CREATE RECORD GROUP.
    But if i pass a numeric value it works fine.
    Can any one tell me how to pass a character value in single quotes to a select statement which itself is in single quotes.
    thanx in advance
    Please mail the solution [email protected]
    navneet jain

    If I understood what you're asking...
    'select ... where columna = ''a'' and columnb = 1'
    (note the two 's - they are not a ")

  • SOMEBODY HELP ME WITH A RECORD GROUP URGENT !

    I HAVE THE NEXT ERROR 'UNHANDLED ERROR IN ICRG 102' IN ORACLE FORMS 5.0 WHEN I CREATE A RECORD GROUP WITH THE SENTENCE 'select nombres, to_char(ficha) from abogados order by nombres ' where nombres is data type VARCHAR2 and ficha is NUMBER. TOO I GOT IT THE SAME ERROR WHEN I CREATED A PROCEDURE WITH THE NEXT CODE:
    PROCEDURE Populate_The_List(list_id VARCHAR2, sql_stat VARCHAR2) IS
    group_id RecordGroup;
    outcome NUMBER;
    BEGIN
    --Create temporary record group.
    group_id := CREATE_GROUP_FROM_QUERY('List_Elements', sql_stat);
    IF ID_NULL(group_id) THEN
    MESSAGE('Record Group could not be created in Populate_the_List.');
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    --Populate record group.
    outcome := POPULATE_GROUP(group_id);
    IF outcome <> 0 THEN
    MESSAGE('Record Group could not be populated in Populate_the_List.');
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    --Populate list item
    POPULATE_LIST(list_id, group_id);
    --Destroy the temporary record group to release resources
    DELETE_GROUP(group_id);
    EXCEPTION
    WHEN OTHERS THEN
    MESSAGE('Internal error occurred in Populate_the_List.');
    RAISE FORM_TRIGGER_FAILURE;
    END Populate_the_List;
    ANYBODY CAN HELP ME WITH THE SOLUTION
    ATTE: ROBERTO
    SORRY FOR MY ENGLISH

    Hi Roberto,
    I don't understand your message!
    What do you did?
    bye Roxane
    --thanks Roxane I did'it, but there is where jump the message
    --the error, do you have other solution.
    --Sorry
    --Roberto                                                                                                                                                                                                                                                                                                                                                                                                                                                

  • Most urgent:::: passing parameter list  to reports containing record groups

    hi
    can any one help me , i am getting frm-41214 when i pass a paramter list containing record group as data parameter to run_report_object as parameter, calling report from forms 10g, but when i dont pass the parameter list the report runs displaying no data(as it should do), otherwise it dont run and display the frm-41214
    zulfiqar

    Hi!
    To suppress Oracle Reports native Parameter Form just add:
    add_parameter( pl_id, 'pARAMform', text_parameter, 'NO' );
    Andrew Velichko
    Brainbench MVP for Oracle Developer 2000 http://www.brainbench.com
    null

  • Record Group functions - Problerms with a function Get_Group_Selection

    Anywone knows how to delete a record from a record group, i have this code below on the trigger KEY-DELREC, every time i delete a record this code is execute. The problem here is that i whant to delete a row in a record group but , i can't use the function Get_Group_Selection, to find the number of the row i want to delete, when i use the function Get_Group_Selection, it gives me the error FRM-41087 .
    Can aywone help me with that , it's urgent!!
    Thanks
    DECLARE
    ora_err NUMBER;
    rg_id RECORDGROUP;
    the_Rowcount NUMBER;
    gc_id1 GroupColumn;
    gc_id2 GroupColumn;
    v_art_grp_no number(3);
    v_descr VARCHAR2(20);
    v_art_grp_no2 number(3);
    v_descr2 VARCHAR2(20);
    v_ctn NUMBER := 0;
    v_row NUMBER;
    begin
    rg_id := Find_Group('REG_REPAIRS_COMPONENTS');
    the_Rowcount := Get_Group_Row_Count( rg_id );
    --** Make sure the column name specified exists in the ** record Group. */
    gc_id1 := Find_Column('REG_REPAIRS_COMPONENTS.ART_GRP_NO');
    gc_id2 := Find_Column('REG_REPAIRS_COMPONENTS.DESCR');
    FOR j IN 1..the_Rowcount LOOP
         v_ctn := Get_Group_Selection(rg_id,j);
         v_art_grp_no := Get_Group_Number_Cell(gc_id1,v_ctn);
    v_descr := GET_GROUP_CHAR_CELL(gc_id2,     v_ctn );
    if UPPER(v_descr) = UPPER(:system.cursor_value) and UPPER(v_art_grp_no) = UPPER(:repairs_components.art_grp_no) then
         Delete_Group_Row('REG_REPAIRS_COMPONENT',      v_ctn);
         delete_record;
         end if;
         END LOOP;
    end;

    Thanks for the HELP!
    But now i have an other problem that is when i invoke the when-validate item trigger it searchs the field for a value that´s is equal to value in a record group and if it finds it, it raises
    raise_form_trigger_failure and displays a messagem, it works fine but if a press the button save or back it displays the message and after if i press the default button to delete again it doesn´t work .

  • Report based on a reord group - PROBLEM

    Using Reports Server / Forms/Reports 6i
    I am trying to run a report based on a record group on the web. It fails giving the error 'Cannot run report.'
    The report is called from a form and the record group is passed as a data parameter. It works fine in Client/Server.
    I have tried to remove the data parameter and run the report without it but, despite working in the Client/Server environment, it still fails on the Web.
    Does anyone have any suggestions?

    I have found the answer to my problem in the forms forum!
    Apparently, this type of report won't work on the web and I have to use temporary tables!

  • Dynamically  populate  a  record  group  on  the  fly uisng LOV

    Hi,
    I want to create dynamically populate a record group on the fly uisng LOV.
    1. This is how the RG_BANKNAME Record Group object look like
    Object : Record Group
    Name : RG_BANKNAME
    Record Group Query : SELECT NAME, SHORT_NAME FROM C_BANKS
    2. I create the Push Button and when user click it will popup the LOV.
    DECLARE
         rg_id RecordGroup;
         errcode NUMBER;
         status BOOLEAN;
    BEGIN
         rg_id := Find_Group('RG_BANKNAME');
         IF Id_Null(rg_id) THEN
              Message('No such group: ',ACKNOWLEDGE);
              RAISE Form_Trigger_Failure;
         ELSE
              errcode :=POPULATE_GROUP(rg_id);     
              SET_LOV_PROPERTY('LV_NAME', TITLE, 'My Own LOV');
              SET_LOV_PROPERTY('LV_NAME', GROUP_NAME, rg_id);
              SET_LOV_COLUMN_PROPERTY('LV_NAME', 1 ,Title, 'NAME');
              SET_LOV_COLUMN_PROPERTY('LV_NAME', 1 ,Width, 150);     
              SET_LOV_COLUMN_PROPERTY('LV_NAME', 2 ,Title, 'SHORT NAME');
              SET_LOV_COLUMN_PROPERTY('LV_NAME', 2 ,Width, 100);     
              status := Show_LOV('LV_NAME',10,20);
              IF NOT status THEN
                   Message('You have not selected a value.');
                   Bell;
              END IF;
         END IF;
    END;
    My question is do I need to create the LOV Object name call 'LV_NAME'? since I don't have this
    create on my design times, because I thought it can be done dynamically on the fly.
    The problem is compliant that the Lov Id is not valid.
    Thanks
    David
    Edited by: user445990 on May 24, 2011 9:19 PM

    Hello,
    You request is not clear. Do you need to display the LOV or not ? In other words, what is the goal of your record group ?
    Francois

Maybe you are looking for

  • Can't import songs to iTunes library

    So, I've looked around and seen that other people have experienced this same problem. However, the solutions provided in those various discussions proved to be useless for me. My issue is that when I try to add songs to my iTunes library, nothing hap

  • Flash Player Doesn't Work

    I have a dell laptop running win xp and the latest i.e. browser and I've installed the flash player and get that cute spinning sign saying it's installed but when I go to any site that uses flash (examples: youtube.com, karibyron.com) I can't do squa

  • Error in J1IIN

    Dear SAP Experts, I have made a new sales document types for our new launch product, for example - ABCD (Contract) - ACCD (Sales Order) - LF - AFSB (Billing) - j1iin. I have done required configuration for the same. when i made sales order to billing

  • How to set current row in table after use tab key on inputText

    Hello all, My first post .., I'm newbie in ADF and I will try to explain my problem. For the moment we use ADF 11g (11.1.1.4), in a jsff page I have a table with an inputText column. On the valueChangeListener of the inputText, I invoke a method in a

  • JMS and a TransactionManager

    Hi there I wonder if someone could point me in the right mental direction (even to the right corner of the web) I've created a Java app which reads messages from a JMS queue and fork's them to other multiple queue's. Everythings hunky dorey with this