Dynamic Lists in Forms4.5

From: <nilesh_at_cheerful.com>
Date: 1998/03/05
Message-ID: <6dnvfm$kqf$1_at_nnrp1.dejanews.com>#1/1


hello,

[Quoted] [Quoted] I am trying to populate a list at runtime. This is what the table is

SQL> select * from cities;

  CITY_ID CITY_NAME

--------- ------------------------------
        1 BOMBAY
        2 PUNE
        3 DUBAI
        4 BANGALORE
        5 JODHPUR

In the form I have a emp_master_clock corresponding to the emp_master_table in the database.

[Quoted] There is a list box which give the city values and which I want to populate. [Quoted] I have written a when-new-bock-instance trigger:

DECLARE
 group_id RecordGroup:= Find_group('city_names');

 it_id        Item := Find_Item('city_list');
 status       NUMBER;

 sqlstmt varhcar2(200);

BEGIN sqlstmt := 'Select city_id id, city_name value from cities';

if (Id_Null(group_id)) then

    group_id := Create_Group_From_Query('city_names',sqlstmt);     status := Populate_Group('city_names');     Populate_List(it_id,'city_names');
else

    Populate_List(it_id,'city_names');
end if;

END; I cant populate the group. Error FRM 41072 Cant Populate city_names And this is what help says :

FRM-41072: Cannot create Group <record group name>. Cause: Caused by one of the following

1.  Duplicate column names in SQL statement.
2.  Invalid record group name.
3.  Query is invalid.
Action:	Check the group name and/or correct the SQL statement.
Level:	20
Type:	Error

It cant be 1, there are no duplicate columns in the query. It could be 2, but why would the record group be invalid? It cant be 3, the query is valid.

What should I do?

Thankx,

Nilesh Porwal,
nilesh_at_cheerful.com

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Thu Mar 05 1998 - 00:00:00 CET

Original text of this message