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

GET_GROUP_SELECTION Built-in

Description

Retrieves the sequence number of the selected row for the given group.

Syntax

FUNCTION GET_GROUP_SELECTION
(recordgroup_id RecordGroup,
selection_number
NUMBER);

FUNCTION GET_GROUP_SELECTION
(recordgroup_name VARCHAR2,
selection_number
NUMBER);

Built-in Type unrestricted function

Returns NUMBER

Enter Query Mode yes

Parameters

recordgroup_id 
 
Specifies the unique ID that Oracle Forms assigns to the record group when it creates it. Use the FIND_GROUP Built-in to return the ID to a variable. The data type of the ID is RecordGroup.
 
recordgroup_name 
 
Specifies the name of the record group that you gave to the group when creating it.
 
selection_number 
 
Identifies the selected rows in order of their selection. For example, given that rows 3, 7, and 21 are selected, their respective selection values are 1, 2, and 3. The selection_number argument takes a value of the NUMBER data type.

GET_GROUP_SELECTION Examples

/*

** Built-in: GET_GROUP_SELECTION
** Example: Return a comma-separated list (string) of the
** selected part numbers from the presumed
** existent PARTNUMS record group.
*/
FUNCTION Comma_Separated_Partnumbers
RETURN VARCHAR2 IS
tmp_str VARCHAR2(2000);
rg_id RecordGroup;
gc_id GroupColumn;
the_Rowcount NUMBER;
sel_row NUMBER;
the_val VARCHAR2(20);
BEGIN
rg_id := Find_Group('PARTNUMS');
gc_id := Find_Column('PARTNUMS.PARTNO');
/*
** Get a count of how many rows in the record group have
** been marked as "selected"
*/
the_Rowcount := Get_Group_Selection_Count( rg_id );
FOR j IN 1..the_Rowcount LOOP
/*
** Get the Row number of the J-th selected row.
*/
sel_row := Get_Group_Selection( rg_id, j );
/*
** Get the (VARCHAR2) value of the J-th row.
*/
the_val := Get_Group_CHAR_Cell( gc_id, sel_row );
IF j = 1 THEN
tmp_str := the_val;
ELSE
tmp_str := tmp_str||','||the_val;
END IF;
END LOOP;
RETURN tmp_str;
END;