Home » Developer & Programmer » Forms » No data in list item (merged 3) (Oracle forms 10g)
No data in list item (merged 3) [message #496577] Tue, 01 March 2011 01:52 Go to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
I am populating the list item from predefined record group. the form is running fine but it didnt show the data present in the record group. I have placed the following code in Pre-Form trigger.

declare
list_id item;
rg_id recordgroup;

begin


rg_id := find_group('RECORD_GROUP9');

list_id := find_item('block2.list4');
clear_list(list_id);
populate_list(list_id, rg_id);

end;

Re: No data in list item (merged 3) [message #496586 is a reply to message #496577] Tue, 01 March 2011 03:30 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
There's nothing obviously wrong with the code so I'd assume the record group contains no records.
Re: No data in list item (merged 3) [message #496591 is a reply to message #496586] Tue, 01 March 2011 03:39 Go to previous messageGo to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
I have checked the query which i have used in record group. It is showing records in toad what i am expecting... I dont know myself what is the error, thinking on the same problem since last 3-4hrs but dint get any solution. if you have some other solution to this problem or some other thing you want to check i am available. I just want to get rid of it.
Re: No data in list item (merged 3) [message #496595 is a reply to message #496591] Tue, 01 March 2011 03:47 Go to previous messageGo to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
I have also checked with other query.... It does not help me Sad
Re: No data in list item (merged 3) [message #496597 is a reply to message #496595] Tue, 01 March 2011 03:59 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Show us the record group query.
Re: No data in list item (merged 3) [message #496600 is a reply to message #496597] Tue, 01 March 2011 04:07 Go to previous messageGo to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
query: SELECT to_char(per_request_type.rt_request_name), to_char(per_request_type.rt_request_name) FROM per_request_type order by 2
Re: No data in list item (merged 3) [message #496603 is a reply to message #496600] Tue, 01 March 2011 04:37 Go to previous messageGo to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
anyways i have solved my problem by getting the things other way around. he is the general code and every one can use it by passing the name of the item and query as argument to this function

PROCEDURE fill_list (v_item varchar2, v_query varchar2) IS

rg_id RecordGroup;
list_id Item;
error number;

BEGIN

rg_id := find_group ('Test');
if ID_Null (rg_id) then
rg_id := create_group_from_query ('Test', v_query);
end if;
error := populate_group(rg_id);
list_id := Find_Item (v_item);
clear_list (list_id);
populate_list (list_id, rg_id);

END;


but if still someone find the error in the previous it will be appreciated Smile
Re: No data in list item (merged 3) [message #529466 is a reply to message #496577] Tue, 01 November 2011 05:26 Go to previous message
inspirer2008
Messages: 3
Registered: October 2011
Location: Jordan
Junior Member
About your previous issue,

In your query

Try to make the first column as ELEMENT which is the display of your list, and second column as value,

Don't forget to check data type and maximum length of list item

Regards
Previous Topic: JINITIATOR
Next Topic: How to open pdf files using forms 6i
Goto Forum:
  


Current Time: Sat Sep 07 13:06:53 CDT 2024