Home » Developer & Programmer » Forms » populating list by a recordgroup
populating list by a recordgroup [message #78690] Mon, 11 March 2002 02:45 Go to next message
Amit
Messages: 166
Registered: February 1999
Senior Member
DECLARE
N NUMBER:=NULL;
REC_ID RECORDGROUP;
DATA VARCHAR (30);

BEGIN
REC_ID:=FIND_GROUP('rcgrplist');


IF ID_NULL(REC_ID) THEN
MESSAGE('RECORD GROUP DOES NOT EXIST');
ELSE
N:= POPULATE_GROUP_WITH_QUERY(REC_ID,'SELECT * FROM SANDY.DEVICE ');
IF N = 0 THEN
MESSAGE('RC_GRP OK');
ELSE
MESSAGE('RC_GRP CANNOT BE FILLED IN ');
END IF;

DECLARE
GRP_ID GROUPCOLUMN;
NUM NUMBER;
I NUMBER;

begin
GRP_ID := FIND_COLUMN('rcgrplist.DEV_NAME');
NUM:=GET_GROUP_ROW_COUNT(REC_ID);
MESSAGE(TO_CHAR(NUM));
FOR I IN 0..NUM LOOP
DATA := GET_GROUP_CHAR_CELL(GRP_ID,I);

NULL;
END LOOP;
NULL;
end;
POPULATE_LIST(FIND_ITEM('TT_ISSUE.D_LIST'),REC_ID);
END IF;

END;

the error messages i get are
1.
cannot get group data frm 41084
2.
invalid group for list population.frm 41334
Re: populating list by a recordgroup [message #78691 is a reply to message #78690] Mon, 11 March 2002 03:14 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
have u created record group in the designer.there is not create_group statement.
Re: populating list by a recordgroup [message #78697 is a reply to message #78690] Mon, 11 March 2002 07:27 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
first of all, list requires two value i.e. name and value pair.

N.B.:-see line marked ****
----so first part is-------
DECLARE
N NUMBER:=NULL;
REC_ID RECORDGROUP;
DATA VARCHAR (30);
BEGIN
REC_ID:=FIND_GROUP('rcgrplist');
IF ID_NULL(REC_ID) THEN
MESSAGE('RECORD GROUP DOES NOT EXIST');
ELSE
****N:= POPULATE_GROUP_WITH_QUERY(REC_ID,'SELECT col1,col2 FROM SANDY.DEVICE ');
IF N = 0 THEN
MESSAGE('RC_GRP OK');
ELSE
MESSAGE('RC_GRP CANNOT BE FILLED IN ');
END IF;
end if;
end;
------------------------------
-------------------------------------
begin
****POPULATE_LIST(list_name,'rcgrplist');
END IF;

END;
Re: populating list by a recordgroup [message #78729 is a reply to message #78697] Wed, 13 March 2002 00:54 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
hi partap,
u suggested me the following;
-------------------------------------------------------

first of all, list requires two value i.e. name and value pair.
N.B.:-see line marked ****
----so first part is-------
DECLARE
N NUMBER:=NULL;
REC_ID RECORDGROUP;
DATA VARCHAR (30);
BEGIN
REC_ID:=FIND_GROUP('rcgrplist');
IF ID_NULL(REC_ID) THEN
MESSAGE('RECORD GROUP DOES NOT EXIST');
ELSE
****N:= POPULATE_GROUP_WITH_QUERY(REC_ID,'SELECT col1,col2 FROM SANDY.DEVICE ');
IF N = 0 THEN
MESSAGE('RC_GRP OK');
ELSE
MESSAGE('RC_GRP CANNOT BE FILLED IN ');
END IF;
end if;
end;
------------------------------
-------------------------------------
begin
****POPULATE_LIST(list_name,'rcgrplist');
END IF;

END;

-------------------------------------------------------

populate_list requires only 2 args (list_name,rc_grp_name)
whereas what u are saying of name & value pair is of add_list_element.
it is for the populate_list i get error saying invalid rcgrp for list population.
Re: populating list by a recordgroup [message #78732 is a reply to message #78697] Wed, 13 March 2002 01:13 Go to previous message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
1. the record group requires two argument (name,value pair) , not the add_list element
2.now ur code is fine, just the check the data type and data length of the col1,col2 and the list element, there may be a mismatch
Previous Topic: How to upload forms5.0 forms into web
Next Topic: Refreshing a Form
Goto Forum:
  


Current Time: Thu Apr 18 13:40:20 CDT 2024