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

GET_GROUP_RECORD_NUMBER Built-in

Description

Returns the record number of the first record in the record group with a column value equal to the cell_value parameter. If there is no match, 0 (zero) is returned.

Syntax

FUNCTION GET_GROUP_RECORD_NUMBER
(groupcolumn_id GroupColumn,
cell_value
NUMBER);

FUNCTION GET_GROUP_RECORD_NUMBER
(groupcolumn_name VARCHAR2,
cell_value
NUMBER);

FUNCTION GET_GROUP_RECORD_NUMBER
(groupcolumn_id GroupColumn,
cell_value
DATE);

FUNCTION GET_GROUP_RECORD_NUMBER
(groupcolumn_name VARCHAR2,
cell_value
DATE);

FUNCTION GET_GROUP_RECORD_NUMBER
(groupcolumn_id GroupColumn,
cell_value
VARCHAR2);

FUNCTION GET_GROUP_RECORD_NUMBER
(groupcolumn_name VARCHAR2,
cell_value
VARCHAR2);

Built-in Type unrestricted function

Returns NUMBER

Enter Query Mode yes

Parameters

groupcolumn_id 
 
Specifies the unique ID that Oracle Forms assigns to the record group column when it creates it. Use the FIND_COLUMN Built-in to return the ID to a variable. The data type of the ID is GroupColumn.
 
groupcolumn_name 
 
Specifies the name of the record group column that you gave to the group when creating it. The data type of the name is VARCHAR2.
 
cell_value 
 
Specifies the value to find in the specified record group column. The data type of the name is VARCHAR2, NUMBER, or DATE.

GET_GROUP_RECORD_NUMBER Restriction

GET_GROUP_RECORD_NUMBER Example

/*

** Built-in: GET_GROUP_RECORD_NUMBER
** Example: Find the first record in the record group with a
** cell in a column that is identical to the value
** specified in the cell_value parameter.
*/
DECLARE
rg_id RecordGroup;
match NUMBER := 2212;
status NUMBER;
the_recordnum NUMBER;
BEGIN
rg_id := Create_Group_From_Query('QGROUP',
'SELECT ENAME,EMPNO,SAL FROM EMP ORDER BY SAL DESC');
status := Populate_Group( rg_id );
*/ *** Zero status is success*** /
IF status = 0 THEN
the_recordnum :=Get_Group_Record_Number('QGROUP.ENAME',match);
Message('The first match is record number '||to_CHAR(the_recordnum));
ELSE
Message('Error creating query record group.');
RAISE Form_Trigger_Failure;
END IF;
END;