Error with code? [message #676] |
Tue, 26 February 2002 06:03 |
Greg Horton
Messages: 37 Registered: February 2002
|
Member |
|
|
I have created a WHEN_NEW_FORM_INSTANCE trigger at the block level and inserted the following code:
declare
TABLE_NAME_RG recordgroup;
errcode NUMBER;
begin
TABLE_NAME_RG:=create_group_from_query('TABLE_NAME_LIST',
'select table_name from user_tables');
errcode:=POPULATE_GROUP(TABLE_NAME_RG);
populate_list('MINE_DATA.TABLE_NAME_LIST',TABLE_NAME_RG);
end;
However, when i compile the form im getting the following error:
FRM-30351: No list elements defined for list item.
List TABLE_NAME_LIST
Can you see where im going wrong?
Greg
|
|
|
Re: Error with code? [message #677 is a reply to message #676] |
Tue, 26 February 2002 06:11 |
pratap kumar tripathy
Messages: 660 Registered: January 2002
|
Senior Member |
|
|
1. when-new-form-instance should be in form-level and not in block-level
2. it is a warning and not a error.
3. go to properties of the list item and go to list element properties and set at least one value (dummy value)
|
|
|
Re: Error with code? [message #679 is a reply to message #676] |
Tue, 26 February 2002 06:28 |
Greg Horton
Messages: 37 Registered: February 2002
|
Member |
|
|
I have set an inital value as DUMMY in the "Elements in List" property. However, when i run the form with the WHEN_NEW_FORM_INSTANCE trigger attached below, only DUMMY is displayed in the list item and no table names.
DECLARE
TABLE_NAME_RG recordgroup;
errcode NUMBER;
BEGIN
TABLE_NAME_RG:=create_group_from_query('TABLE_LIST',
'select table_name from user_tables');
errcode:=POPULATE_GROUP(TABLE_NAME_RG);
populate_list('MINE_DATA.TABLE_NAME_LIST',TABLE_NAME_RG);
END;
Any ideas?
Greg
|
|
|
Re: Error with code? [message #682 is a reply to message #676] |
Tue, 26 February 2002 07:06 |
pratap kumar tripathy
Messages: 660 Registered: January 2002
|
Senior Member |
|
|
i think u must be getting error frm-41334.
however change the query
from
----
'select table_name from user_tables'
to
--
'select table_name,table_name from user_tables'
because list always expects pair of value.first one is stored internally and it is returned when u select one of the list item. second is only for display purpose
|
|
|