A script-enabled browser is required for this page to function properly.

ADD_GROUP_ROW Built-in

Description

Adds a row to the given record group.

Syntax

PROCEDURE ADD_GROUP_ROW
recordgroup_id RecordGroup,
row_number
NUMBER);

PROCEDURE ADD_GROUP_ROW
recordgroup_name VARCHAR2,
row_number
NUMBER);

Built-in Type unrestricted procedure

Enter Query Mode yes

Parameters

recordgroup_id 
 
The unique ID that Oracle Forms assigns when it creates the group. The data type of the ID is RecordGroup.
 
recordgroup_name 
 
The name you gave to the record group when creating it. The data type of the name is VARCHAR2.
 
row_number 
 
A whole number that specifies a row in the group. If you add a row to any but the last position in a group, all rows below that are logically renumbered. To add a row to the end of a group, use the END_OF_GROUP constant.

Error Conditions:

Oracle Forms returns a runtime error given either of the following conditions:

ADD_GROUP_ROW Restrictions

ADD_GROUP_ROW Examples

/* **Built-in: ADD_GROUP_ROW 
 ** Example: Add ten rows to a new record group and populate. 
 */ 
 PROCEDURE Populate_My_Group IS 
 rg_name VARCHAR2(20) := 'My_Group'; 
 rg_col1 VARCHAR2(20) := rg_name||'.NumCol'; 
 rg_col2 VARCHAR2(20) := rg_name||'.CharCol'; 
 rg_id RecordGroup; 
 gc_id GroupColumn; 
 in_words VARCHAR2(15); 
 
 BEGIN 
 /* 
 ** Check to see if Record Group already exists 
 */ 
 rg_id := Find_Group( rg_name ); 
 /* 
 ** If it does, then clear all the rows from the group and 
 ** populate ten rows with the numbers from 1..10 along 
 ** with the equivalent number in words. 
 ** 
 ** Row# NumCol CharCol 
 ** ---- ------ ------- 
 ** 1 1 one 
 ** 2 2 two 
 ** : : : 
 ** 10 10 ten 
 
 */ 
 IF NOT Id_Null(rg_id) THEN 
 Delete_Group_Row( rg_id, ALL_ROWS ); 
 END IF; 
 FOR i IN 1..10 LOOP 
 /* 
 ** Add the i-th Row to the end (bottom) of the 
 ** record group, and set the values of the two cells 
 */ 
 in_words := TO_CHAR(TO_DATE(i,'YYYY'),'year'); 
 Add_Group_Row( rg_id, END_OF_GROUP ); 
 Set_Group_Number_Cell( rg_col1, i, i); 
 Set_Group_Char_Cell( rg_col2, i, in_words); 
 END LOOP; 
 END;