AddRowRecGroupManuallyThis is a featured page

Adding rows to a LOV’s Record Group manually

Problem
You have a lov, and you want the record group be generated manually.
  1. You create a recordgroup and a LOV as you do usually
  2. You create another recordgroup
  3. You fill that recordgroup
  4. You assign that recordgroup to the LOV
PROCEDURE UpdateRecordGroupLov(cRGName VARCHAR2, cLovName VARCHAR2 ) IS
group_id RecordGroup;
nRow NUMBER :=0;
col1 GroupColumn;
col2 GroupColumn;
BEGIN
SET_LOV_PROPERTY (cLovName,GROUP_NAME,cRGName);

-- Create Record Group
group_id := Find_Group(cRGName||'2');
IF NOT ID_NULL(group_id) THEN
DELETE_GROUP(group_id);
END IF;
group_id := Create_Group(cRGName||'2');
col1 := Add_Group_Column(group_id, 'ordenint',
NUMBER_COLUMN);
col2 := Add_Group_Column(group_id, 'orden',
CHAR_COLUMN,13);

-- Fill RecordGroup
FOR A IN ( SELECT 1 Column_1,1 Column_2
FROM DUAL ORDER BY 1 ) LOOP

nRow := nRow +1;
-- You have to add record and values only in the manually created record group
Add_Group_Row(group_id, nRow);
Set_Group_NUMBER_Cell(col1, nRow, A.Column_1);
Set_Group_Char_Cell(col2, nRow, A.Column_2);


END LOOP;

--Set new record group to LOV
SET_LOV_PROPERTY (cLovName,GROUP_NAME,cRGName||'2');

END;


No user avatar
juancarlosreyesp
Latest page update: made by juancarlosreyesp , Sep 26 2008, 11:46 AM EDT (about this update About This Update juancarlosreyesp Edited by juancarlosreyesp

150 words added

view changes

- complete history)
Keyword tags: None
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.