Adding Rows to a Record Group

Use the ADD_GROUP_ROW procedure to add rows to a group. When you call ADD_GROUP_ROW, you indicate where you want Oracle Forms to insert the new row by either passing in a row number or specifying that the row be placed at the end of all existing rows.

To insert a new row at a specific position:

To add a row at the end of all existing rows:

The column values in the newly added row default to NULL. To set the values of individual columns, use the procedure appropriate to the datatype of the cell:

Note: You cannot programmatically add rows to a static record group.

Adding rows to a record group Examples

/* The following example adds a row at the end of the
** group my_group and then sets the values of each cell
** in the new row:
*/

DECLARE
group_id  RecordGroup := Find_Group('my_group');
total_rows NUMBER;
new_row  NUMBER;

BEGIN
/* find out how many rows there are in the group now */
total_rows := Get_Group_Row_Count(group_id);

/* add a row at the end of the group my_group */
Add_Group_Row(group_id, END_OF_GROUP);

/* increment total_rows to get the row number of the new row */
new_row := total_rows + 1;

/* set the value of columns 1,2, and 3 in the new row */
Set_Group_Char_Cell('my_group.col1, new_row, 'xyz company');
Set_Group_Char_Cell('my_group.col2', new_row, 'district 12');
Set_Group_Number_Cell('my_group.col3', new_row, 400);
END;


About record group Built-in subprograms

About manipulating a record group at runtime

Performing operations on rows

ADD_GROUP_COLUMN Built-in

ADD_GROUP_ROW Built-in