populating list by a recordgroup [message #78690] |
Mon, 11 March 2002 02:45 |
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 #78697 is a reply to message #78690] |
Mon, 11 March 2002 07:27 |
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 |
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.
|
|
|
|