Home » Developer & Programmer » Forms » populate group
populate group [message #78848] Wed, 20 March 2002 00:44 Go to next message
annu
Messages: 34
Registered: February 2002
Member
DECLARE
rg_name VARCHAR2(40) := 'EMP_group';
rg_id RecordGroup;
errcode NUMBER;
It_Id Item;
begin
Set_Window_Property(FORMS_MDI_WINDOW, WINDOW_STATE, MAXIMIZE);
Set_Window_Property('WINDOW1', WINDOW_STATE, MAXIMIZE);

rg_id := Find_Group(rg_name);
IF Id_Null(rg_id) THEN
rg_id := Create_Group_From_Query ( rg_name,'SELECT ENAME,EMPNO into :EMP.EMPNO FROM EMP');
End if;
errcode := Populate_Group( rg_id );
It_Id := find_item('EMP.EMPNO');
Populate_List(It_Id,rg_id);
END;

---- Properties For Empno

number(4)

---- error shows -----
FRM-32082: Invalid value for given item type.
List EMPNO
Item: EMPNO
Block: EMP
Form: MODULE10
FRM-30085: Unable to adjust form for output.
-----------------------
Please let me know what i m doing mistake here and explane it
Re: populate group [message #78849 is a reply to message #78848] Wed, 20 March 2002 01:24 Go to previous message
SANDY
Messages: 60
Registered: April 1998
Member
hi annu
i faced same kind of problem while filling up a list by a rcgrp .
bbut i received errors sayying that frm41334 invalid grp for lst population when the grp was created in the designer.
when i used create_gruop_from_query i get another error message.

i can suggest u a shortcut which goes in the following lines.
hope it works since i got rid of the problem using it.

if any problems ,mail me.

DECLARE
N NUMBER:=NULL;
REC_ID RECORDGROUP;
VAR CHAR (30);
DATA CHAR (30);
I NUMBER;
BEGIN

REC_ID:=FIND_GROUP('rc');
IF ID_NULL (REC_ID)THEN
REC_ID:=CREATE_GROUP_FROM_QUERY('RC','SELECT DEV_NAME FROM SANDY.TEMP_DEVICE');
END IF;
IF NOT ID_NULL (REC_ID)THEN
N:=POPULATE_GROUP(REC_ID);
IF N = 0 THEN NULL;
--MESSAGE('RECORD GROUP POPULATED SUCESSFULLY');
END IF;
--MESSAGE (GET_GROUP_CHAR_CELL('RC.DEV_NAME',2));
CLEAR_LIST('TT_ISSUE.D_LIST');
N:=0;
LOOP
ADD_LIST_ELEMENT('TT_ISSUE.D_LIST',N,GET_GROUP_CHAR_CELL('RC.DEV_NAME',N+1),GET_GROUP_CHAR_CELL('RC.DEV_NAME',N+1));
EXIT WHEN N >= GET_GROUP_ROW_COUNT(REC_ID);
N:=N+1;
END LOOP;
END IF;


SET_WINDOW_PROPERTY ( FORMS_MDI_WINDOW , WINDOW_STATE , MAXIMIZE );
SET_WINDOW_PROPERTY ( 'WINDOW0' , WINDOW_STATE , MAXIMIZE );
SET_WINDOW_PROPERTY ( FORMS_MDI_WINDOW , TITLE , ' ' );
SET_WINDOW_PROPERTY ( 'WINDOW0' , TITLE , 'MIT' );

END;
Previous Topic: Before insert or update or delete...
Next Topic: Re: Database Change Management Software???
Goto Forum:
  


Current Time: Sat May 30 14:26:15 CDT 2020