Request of the record group.

Hello
I have a group record Forms 4.5 created with CREATE_GROUP_FROM_QUERY. How to use this record group as a source of records for a block?

Thanks in advance.

"query record group ' means that you fill out the Group Record with a query values not static.

François

Tags: Oracle Development

Similar Questions

  • FRM-30187: size of the column of type CHAR in the record group must be between 1 and 2000.

    Hi, forms 6i, db 10g

    I created a lov based on this query

    select * from items_qty_vu -- database view
    

    and the view code is

    CREATE OR REPLACE FORCE VIEW items_qty_vu (serial, item_id, expiry_date, qty)
    AS
       WITH item_units_plus AS
            (SELECT item_id, unit_id, factor,
                    LEAD (factor, 1, 1e99) OVER (PARTITION BY item_id ORDER BY factor)
                                                                   AS next_factor,
                    ROW_NUMBER () OVER (PARTITION BY item_id ORDER BY factor DESC)
                                                                           AS rnk
               FROM item_units)
       SELECT     ID.serial, ID.item_id, ID.expiry_date,
                  SUBSTR
                     (SYS_CONNECT_BY_PATH (   TRUNC (  MOD ((  ID.qty
                                                             - ID.qty_allocated
                                                            ),
                                                            iup.next_factor
                                                           )
                                                     / iup.factor
                                                    )
                                           || ' '
                                           || u.unit_name,
                                           ', '
                                          ),
                      3
                     ) AS qty
             FROM item_detail ID JOIN items i ON i.item_id = ID.item_id
                  JOIN item_units_plus iup ON iup.item_id = ID.item_id
                  JOIN units u ON u.unit_code = iup.unit_id
            WHERE CONNECT_BY_ISLEAF = 1
       START WITH iup.rnk = 1
       CONNECT BY iup.rnk = PRIOR iup.rnk + 1 AND ID.serial = PRIOR ID.serial
         ORDER BY ID.serial;
    
    

    When I compile the form, I face the error FRM-30187,

    If I replace my query "select * from items_qty_view" with "select item_id, serial, expiry_date of items_qty_vu", it compiles successfully.

    As salamualikum, Salem,.

    You must follow my instructions carefully.

    1. Select the record group.

    2. go in the record group property

    3. Select and open the column specifications

    4. highlight the column and check the decrease of the length, the bellows of the size that you cross more than 2000 then 2000.

    Compilation of now and you're done.

    Wow. you did.

    Hamid

  • change the record group for a lov

    Dear Sirs,
    I have a list of value (LOV) and I have 2 record group, and I want to associate each of these group record depends on the conidition
    for example

    If condition 1
    associate the record group 1 LOV
    on the other
    associate the record group 2 LOV
    end if;

    Please help me
    Thanks in advance

    Check the built-in SET_LOV_PROPERTY, you can use this then assign a recordgroup to a lov.

  • Fill area of the screen with the first value in the record group

    Hi guys, what the title essentially says. I have a display element that is populated by the by selecting the appropriate option in a LOV. Is there a method that I can put in when a new instance of the form or something else to fill the screen with the first item in the record group used to fill the lov to ensure when the load form display area is not empty. I know I have to hard just in code, but I would have the value come from the record group.


    Thank you

    Published by: user13390506 on August 25, 2010 05:39

    This works very well for me:

    Created a record group (RG1) with the following order of selection:

    select table_name, table_name from user_tables order by 1
    

    Created a button on the Web that are running the following:

    PROCEDURE pop IS
       rg_id RecordGroup;
       gc_id GroupColumn;
       col_val VARCHAR2(1000);
       n number ;
    BEGIN
    
       rg_id := Find_Group( 'rg1' ); 
    
       IF Id_Null(rg_id) THEN
       Message('Record Group rg1 does not exist.');
       RAISE form_trigger_failure;
       END IF; 
    
       n := Populate_Group( rg_id) ;
       gc_id := Find_Column( 'RG1.TABLE_NAME' ); 
    
       IF Not Id_Null(gc_id) THEN
         col_val := GET_GROUP_CHAR_CELL( gc_id, 1 );
         message(col_val);
       End if ;
    
    End;
    

    I guess the record_name.column_name at the top of case...

    François

  • How to share the record group between 2 forms

    Hi all

    Some might guide me how to send one record group to another form and how it is received

    programmaticaly

    any help or advice, that I enjoyed

    Thank you

    Hello
    Little late but was not on the development computer.
    In fact the data you are trying to recover also ensure the data type. I mean if you retrieve DIGITAL data record group for the first column you use fld_1 , you must have to use the built-in GET_GROUP_NUMBER_CELL . Like this..

    DECLARE
      rg_id recordgroup;
    BEGIN
      rg_id := FIND_GROUP('my_rg');
      IF NOT id_null(rg_id) THEN
       :ctrl.text_item8 := GET_GROUP_NUMBER_CELL('my_rg.fld_1', 1);
      END IF;
    END;
    

    If If the field you get the record group's CHARACTER then you must use the built-in function GET_GROUP_CHAR_CELL like that...

    DECLARE
      rg_id recordgroup;
    BEGIN
      rg_id := FIND_GROUP('my_rg');
      IF NOT id_null(rg_id) THEN
        :ctrl.text_item8 := GET_GROUP_CHAR_CELL('my_rg.fld_1', 1);
      END IF;
    END;
    

    And if the salvage value of DATE data type, then GET_GROUP_DATE_CELL like this...

    DECLARE
      rg_id recordgroup;
    BEGIN
      rg_id := FIND_GROUP('my_rg');
      IF NOT id_null(rg_id) THEN
        :ctrl.text_item8 := GET_GROUP_DATE_CELL('my_rg.fld_1', 1);
      END IF;
    END;
    

    So, in you case I think the department_id data type is numeric in the database, and you use GET_GROUP_CHAR_CELL which will not work. Use the first one I showed you for numeric values.

    And also use the trigger a TIME NEW FORM INSTANCE used to retrieve the value. I want to use the first example in this trigger. Then you can see the value of the result of the shared record group.

    -Clément

  • Move to the record of the groups now

    I work in form 11g and using the webUtil version that was included with it. I just do my development by remoteing directly on the server because it is easier that develop on my computer the compilation and then sending to the server and then compile again until I can use it and the server runs on Windows Server 2003 SP2.

    For those of you who have not until this follow-up to my posts, I'm working on the use of webUtil to create buttons to upload/download on one of the forms of our program. I FINALLY got webUtil set up and got the part of download works now I am trying to enter the download, I try firstly set up a way to show the user which was transferred to the table (not the actual blob or anything like that just the document filename ID etc) so they can select which file they want to download it to their computer , I tried to do this as well by creating a drop-down list and put the ID doc in that and also just by clicking on the button and pulling it upward a LOV the user to pic and in both cases he works not. The problem, I am running, at least for now, is that somehow it is not able to fill the record, I know that, I just can't understand what may not be correct with the record group... the only properties in the record group is the name of it, the query that fills the size of the extraction and the columns, the query throws an error as soon as you click on that property if there is nothing wrong with that, columns are practically filled auto of forms and the size of the extraction I tried almost all values between 0 and 100, nothing helps.

    The query I use is:

    SELECT ANNUAL, FILENAME
    DOCUMENTATION
    WHERE ANNUAL IS NOT NULL
    ORDER BY ANNUAL CSA

    but when I try to run the program I get a FRM 41076: error group filling. Followed by a FRM 40502: ORACLE error: cannot read the list of values. Of course, he cannot read the list of values there is no value to read because the record group has not been filled.

    Please any help on this is greatly appreciated. The wonderful people of this forum have been absolute rescuers so far on my quest to get this program to work despite the better to keep me from succeeding.
    SELECT DOC_ID, FILENAME
    

    DOCUMENTATION
    WHERE ANNUAL IS NOT NULL
    ORDER BY ANNUAL CSA

    What happens when you run your query more SQL, TOAD, etc.?

    Your table is created in the schema JLIM. This user are you connected to forms with? If it is not the user JLIM, then you will need to reference the table in your query using the schema owner. FOR EXAMPLE:

    SELECT DOC_ID, FILENAME
    FROM jlim.DOCS
    WHERE DOC_ID IS NOT NULL
    ORDER BY DOC_ID ASC
    

    If this table will be used frequently by your form application, you can eliminate the need to fully qualify your table by creating a public synonym to the table.

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • How to use record group to insert data into the hierarchy tree?

    Hello

    I had a hierarchical tree in my block and I want to use the record group to display
    in the hierarchy tree, call david_tree. He did work for the code I try below
    and I think it might be that the create_group_form_query was wrong? or miss an order?


    DECLARE
    htree;
    rg_data RECORDGROUP;
    v_ignore NUMBER;
    BEGIN
    htree: = Find_Item ('tree_block.david_tree');

    rg_data: = CREATE_GROUP_FROM_QUERY ('rg_bank',
    "select name, short_name".
    || "from css_banks");

    -Fill the record with data.

    v_ignore: = POPULATE_GROUP (rg_data);

    -Transfer the data from the record group to the hierarchical
    -tree and bring it to display.

    FTREE. SET_TREE_PROPERTY (htree, FTREE. (RECORD_GROUP, rg_data);

    END;


    Thank you


    David

    David,
    You get an error with your code? Looks like you took your example code help Forms. I don't really see a problem with the code, but the forms example gives an example of how create the record group used by the HTree so the Receiver General may be the cause of the problem. When I used the HTree, I used the FTREE. Procedure ADD_TREE_DATA to fill the tree. When I started working with HTree I created a wrapper package to simplify the process. You can watch how I work with the HTree in a demo that I published called: forms and how to: create a shape of the HIERARCHICAL tree.

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • The point list - record group Query - bad alignment order

    Dear all,

    When I try to concatenate two columns using the query of the record group and display in the list item, the alignment is not in good condition.

    For example; Here are the columns and data used in the process:

    SHORT_DESC CODE_VALUE DESCRIPTION
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    ROLL1 customer - No accidental Production, by booking with another carrier, bad projection.
    Roll2 client project - accidental l/c, B/L, customs, samples, AMS, LAR.
    ABC - lack of vacuum ROLL3 lack of empty units.
    ABC CDE ROLL4 - Roll on decision of the AGR RRR.
    ROLL5 ABC XXX - Accidental IMO or denied OOG, operational problems, Cut & Run.
    ROLL6 ABC YYY - booking fictitious material buffer, dummy booking.

    This is the query of the record group used in forms:
    ----------------------------------------------------------------
    PROCEDURE p_when_new_form_instance
    IS
    GROUP_ID recordgroup;
    list_id question: = FIND_ITEM ('BLK_CONTROL.) LI_ROLL_REASON');
    rg_name VARCHAR2 (20): = "LI_ROLL_REASONS";
    status NUMBER;
    l_query VARCHAR2 (4000);
    BEGIN
    l_query: =.
    ' SELECT rpad (short_desc, 50, "") | "| ''|| description of the description, code_value code_value OF codes WHERE code_value IN ("ROLL1", "roll2", "ROLL3", "ROLL4", "ROLL5", "ROLL6")';
    GROUP_ID: = CREATE_GROUP_FROM_QUERY (rg_name, l_query);
    status: = POPULATE_GROUP (GROUP_ID);
    POPULATE_LIST (list_id, GROUP_ID);
    EXCEPTION
    WHILE OTHERS
    THEN
    pl_common.when_others;
    END;
    -----------------------------------

    In addition, I have my property list item as the default "" MS SANS SERIF"fonts and when I run in Forms Builder get the alignment as below.

    Result:
    ====
    DESCRIPTION CODE_VALUE
    Customer - Non-accidental. Production, by booking with another carrier, bad projection.     ROLL1
    Customer - Accidental | L/c, B/L project, customs, samples, AMS, LAR.     ROLL2
    ABC - lack of vacuum | Lack of empty units.     ROLL3
    ABC ORDER - to the reversal. Decision of the AGR RRR.     ROLL4
    ABC XXX - Accidental | IMO / denied OOG, operational problems, Cut & Run.     ROLL5
    ABC YYY - booking fictitious | Reservation of equipment, fake buffer.      ROLL6

    More high of the order is not the desired result because all the | (vertical bar) should display in the correct order as below.
    Expected result:
    ==========
    DESCRIPTION CODE_VALUE
    Customer - Non-accidental. Production, by booking with another carrier, bad projection.     ROLL1
    Customer - Accidental | L/c, B/L project, customs, samples, AMS, LAR.     ROLL2
    ABC - lack of vacuum | Lack of empty units.     ROLL3
    ABC ORDER - to the reversal. Decision of the AGR RRR.     ROLL4
    ABC XXX - Accidental | IMO / denied OOG, operational problems, Cut & Run.     ROLL5
    ABC YYY - booking fictitious | Reservation of equipment, fake buffer.      ROLL6


    I tried and RPAD LPAD the alignment problem is still there; I know that the issue is due to the fixed length of the police.
    But is there a solution to replace it it will be a great help.



    So please help!


    Thank you...

    Kind regards
    Sunil.G

    If you can not use non proportional fonts, then forget about having any special alignment, because with proportional fonts, room occupied by each letter is different.

    François

  • Is there a limitation of length of sql in a record group?

    Record group contains 4 by union funcion sql statement. When this sql statement longer than 4000 characters then the record group do not allow me to add an additional column to another.

    My question is, is there a limitation of length of sql that record the group support?

    Developer 10g suit.

    Thanks in advance.

    As you have discovered that there is a limit in the form designer, on what size the SQL statement may be in the property Query Group Record in your record group.  Unfortunately, the forms for the Query Group property help topic Record does not that there is a limit or the limit.

    If your request does not fit into the Group Record Query property, you can try to use the integrated Create_Group_From_Query() to fill in your group.  Another option would be to create views in your database, and then select the view in the Query property group Record.

    If you opt to try the method of Create_Group_From_Query(), just set your Group Record in the navigation of the object by using a SELECT statement (your column names) twice and then programmatically remove the Group and re-create it with the high - Create_Group_From_Query ().  See the help topic for the function integrated for a code example.

    Craig...

  • A function can be called record group - Oracle Form 6i.

    Hi all

    I want to create query based LOV in Oracle Form 6i.

    The query I have use of the record group is as follows:

    SELECT DISTINCT

    Nr.rec_locator AS rec_locator,

    car.car_dte AS car_date,

    Get_car_info(:CON.) REF_NO) AS car_number

    Car_list_entries CAR

    contact_details cdt,

    name_records nr

    WHERE car.car_id = cdt.car_id

    AND cdt.nr_id = nr.id

    AND cdt.con_ref_no =: CON. REF_NO

    / * Get_car_info (x NUMBER) is a function of form * /.

    This generates an error:

    It is said

    FRM-12001 (impossible to create the Group Record (check your query)


    Kindly guide how can I use the function of form to achieve the desired result.

    Thank you very much

    Anoop.

    Hi Anoop,

    I can assure you that the issue is not because of the called function of the record group.

    I used the query showing the value of the function; but one thing you should keep in mind is:

    If you create a new item not related in a based lov to sql expression that

    return a character data type, and if the element related to the used in the function

    is generated with a size of 0, then the item not related is generated

    with a size of 4000 and a compilation of the form failed with error FRM-30187

    the solution to this problem is: lov property > column specification > columns one will be having a greater length and 2000 it set its 2000 which is the maximum value. Then it won't work.

  • Dynamic record group works not when using apostrophes

    Hello world

    I developed a form most of the time, everything works as expected. However, there is a search feature that gives me problems. The problem is that when the user enters the search criteria for last_name with an apostrophe (O'brian) lov research get filled because the dynamic disk group is not created when the string contains an apostrophe (i.e. O'brian). I have a dynamic disk group that takes the user's search criteria and fills a LOV on the screen with the corresponding records to their criteria.

    Here is the code that is behind my search button where the dynamic RG is created. It works very well for any research that does not contain an apostrophe. BTW, the Oracle Forms version is 10g.

    DECLARE

    p_where_debtor varchar2 (2000);
    p_where_liab varchar2 (2000);
    RG_ID RecordGroup;
    v_query varchar2 (2000): = null;
    rg_name varchar2 (2000): = "RG_LIAB_LST";
    ERRCODE NUMBER;
    BEGIN

    IF: SEARCH.cd_nb is null and
    : SEARCH.cd_seq is null and
    : SEARCH.f_name is null and
    : SEARCH.l_name is null and
    : SEARCH.mi_name is null
    then
    display_message (' search criteria must be entered ");
    raise form_trigger_failure;
    END IF;

    v_query: = ' SELECT name, middle_name, c_no, c_seq
    FROM TABLE_VW2 WHERE 1 = 1';
    / * Search criteria entered by the user * /.

    IF: SEARCH.l_name_srch IS NOT NULL THEN
    v_query: = v_query | "AND UPPER (last_name) AS"' | Upper(:Search.L_Name) | » %''';
    END IF;

    IF: SEARCH.f_name_srch IS NOT NULL THEN
    v_query: = v_query | "AND UPPER (first_name) AS"' | Upper(:Search.F_NAME) | » %''';
    END IF;

    IF: SEARCH.mi_srch IS NOT NULL THEN
    v_query: = v_query | "AND UPPER (middle_name) AS"' | Upper(:Search.mi_name) | » %''';
    END IF;

    IF: SEARCH.cdcs_nbr_srch IS NOT NULL THEN
    v_query: = v_query | "AND UPPER (c_no) AS"' | Upper(:Search.cd_nb) | » %''';
    END IF;

    IF: SEARCH.cdcs_seq_srch IS NOT NULL THEN
    v_query: = v_query | "AND UPPER (c_seq) AS"' | Upper(:Search.cd_seq) | » %''';
    END IF;

    / * Make sure that the record group exists * /.

    RG_ID: = Find_Group (rg_name);

    / * If there are then create record group * /.

    IF id_null (rg_id) THEN
    RG_ID: = create_group_from_query (rg_name, v_query);
    END IF;

    IF this is id_null (rg_id) THEN
    delete_group (rg_id);

    RG_ID: = create_group_from_query (rg_name, v_query);
    END IF;

    Errcode: = Populate_Group (rg_id);

    Any help would be greatly appreciated.

    Thank you

    Adrian

    For each item where an apostroph may occur, make a

    REPLACE(:BLOCK.ITEM, '''', '''''');
    
  • Creating dynamically record group.

    Hello

    I have multi line block. My req is I create record group dynamically based on some fields of line level. This item then my card code - key.

    DECLARE
    group_id RecordGroup;
    v_lms_lov lov.
    BEGIN

    group_id: = Create_Group_From_Query ("RG_LMSID",
    ' SELECT lms_id
    OF sify_lms_header
    WHERE from_location =: lines.from_location
    AND to_location =: lines.to_location; »

    v_lms_lov: = find_lov ('LOV_LMSID');

    set_lov_property (v_lms_lov, group_name, 'RG_LMSID');

    Set_Item_Property('LINES.) LMS_ID', LOV_NAME, 'LOV_LMSID');

    END;

    It is said, no record in lov. Anything I've missed.
    Or any other way to do this.
    Pl help.

    Thank you
    Kouadio

    Kouadio,

    Why you need dynamic disk group for this?, you can give the control names in the query of the record group. Then the query of the record group will be

    SELECT LMS_ID FROM SIFY_LMS_HEADER WHERE FROM_LOCATION = :LINES.FROM_LOCATION AND TO_LOCATION = :LINES.TO_LOCATION
    

    If you still want to use dynamic disk group creation, then try

    DECLARE
         RG_Group_ID RECORDGROUP;
    BEGIN
         RG_Group_ID := FIND_GROUP('RG_LMSID');
      IF NOT Id_Null(RG_Group_ID) THEN
              DELETE_GROUP(RG_Group_ID);
      END IF;
         RG_Group_ID := CREATE_GROUP_FROM_QUERY('RG_LMSID', 'SELECT LMS_ID FROM SIFY_LMS_HEADER WHERE FROM_LOCATION = ''' || :LINES.FROM_LOCATION || ''' AND TO_LOCATION = ''' || :LINES.TO_LOCATION || '''');
         SET_LOV_PROPERTY('LOV_LMSID',     GROUP_NAME, 'RG_LMSID');
         SET_ITEM_PROPERTY('LINES.LMS_ID', LOV_NAME,   'LOV_LMSID');
    END;
    

    Kind regards

    Manu.

    If my response or response from another person was helpful, please mark accordingly

  • record group records

    How to count the records in the record group?

    Hello
    Get_Group_Row_Count is used to count the records in the record group.

    DECLARE
    RG_ID RecordGroup;
    status NUMBER;
    the_rowcount NUMBER;
    BEGIN
    RG_ID: = find_group ('emp');
    status: = Populate_Group ("emp");
         
         
    the_rowcount: = Get_Group_Row_Count (rg_id);
    MESSAGE (the_rowcount);
    end;

    better compliance
    skyniazi

  • How to get all the records for each group - double

    Hi all

    I have developed customized reports, I have a three for each group, the first group is for PO number and the second is for line number Po and the third is for activity ID.


    Today the third group is based on the activity ID.

    Some time the activity id is unique and other data are different. If at this time its settlement only one record.

    For example

    Date of activity Id

    1 25 - Jan

    1 26 - Jan



    Its single record display.

    Can someone tell me how to avoid this separate for each group.

    Thanks and greetings
    Srikkanth.M

    As another user said, delete syntax regroup.
    Why do you bring here?

  • request with the date of the Group's values

    Hi all

    I have an adate of table with 13 columns with a column named trandate
    with the value as "2008-11-07 18:00:19.

    Now I want to retrieve the values from the table as


    SELECT count (*) from trandate which where ttype = '081' and T_FILE like 'mountain % ';

    I want to count the records for all the months as


    Jan-2009 - 120 (120 is the number of records satifying the above condition and belong to the period January 2009 (derived from trandate column)
    Feb-2009 - 150 (150 is the number of records satifying the above condition and belong to the period February 2009 (derived from trandate column)


    How can I rewrite the query


    Thank you
    Kai

    Published by: KaiS on February 1st, 2011 04:23
    select to_char(trandate,'mmm - yyyy') trandate,
              count(1)
    from trandate
    where where ttype = '081' and T_FILE like 'monT%'
    group by to_char(trandate,'mmm - yyyy');
    

Maybe you are looking for