Home » Developer & Programmer » Forms » populating list items from existing record groups (oracle 9i, Forms 9i , Windows XP)
populating list items from existing record groups [message #358374] Tue, 11 November 2008 00:46 Go to next message
oracle_me
Messages: 59
Registered: March 2008
Member
Hi All,
I want to populate my list item from a record group query.
I created a record group called rec_deptno from object navigator and wrote the query 'select deptno from dept'

Now I use the following code:
declare
rgp_id RECORDGROUP;
listid ITEM;
BEGIN
go_block('emp');
execute_query;
rgp_id := find_group('rec_deptno');
listid := find_item('common.list1');
clear_list (listid);
POPULATE_LIST(listid, rgp_id);
END;

However it gives me a 'FRM-41334 :Invalid record group for list population ' error

I googled out to find that all the codes written in similar cases have create_group_from_query built-in used .
Now I do want to use that and would like to know if we can use an already created record group.
If so, please tell me how to modify my code to make it work..
thanks in advance!!
Re: populating list items from existing record groups [message #358542 is a reply to message #358374] Tue, 11 November 2008 18:57 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Search this forum. This is a very common question.

David
Re: populating list items from existing record groups [message #358574 is a reply to message #358374] Tue, 11 November 2008 21:29 Go to previous messageGo to next message
oracle_me
Messages: 59
Registered: March 2008
Member
hi,

Thank you sir, I have searced this forum and looked into other websites too.
Let me try once more before asking you all..

[Updated on: Tue, 11 November 2008 21:32]

Report message to a moderator

Re: populating list items from existing record groups [message #358579 is a reply to message #358574] Tue, 11 November 2008 21:50 Go to previous message
oracle_me
Messages: 59
Registered: March 2008
Member
Hi All,
I got the solution ..
Actually at design time I used the query
'select deptno from dept'

It seems we need to use two varchar2 colums perhaps one for list value and list elements..
so I rewrote the query
as 'select to_char(deptno) , to_char(deptno) from dept' and voila ! my list item gets populated!!!

Thanks David, searching the forum helped !!! ...
regards
oracle_me
Previous Topic: DDE.DMLERR_NOTPROCESSED -TRANSACTION FAILED error
Next Topic: Creating a User Through Form
Goto Forum:
  


Current Time: Mon Feb 03 15:03:27 CST 2025