Home » Developer & Programmer » Forms » Listitem not populating correctly
Listitem not populating correctly [message #266145] Mon, 10 September 2007 00:42 Go to next message
mylapuram
Messages: 8
Registered: April 2007
Location: Bangalore
Junior Member
Hi ,
I am using D2k(Forms 6.0). I am trying to populate the list dynamically. but i am getting only one item in the listbox even though my record group contains more than one item. i am giving my code here. pls correct me if i am wrong .

declare
rg_id RecordGroup;
list_id ITEM;
BEGIN
list_id:= find_item('V_LIST');
clear_list(list_id);
if :text1 ='Fruits' then
rg_id := find_group ('RG_FRUITS');
else
rg_id := find_group ('RG_VEG');
END if;
populate_list (list_id, rg_id);
end;

I have created two record groups ('RG_FRUITS','RG_VEG') and both has more than one item.

Thanks in advance
Re: Listitem not populating correctly [message #266464 is a reply to message #266145] Mon, 10 September 2007 23:44 Go to previous message
dbhossain
Messages: 155
Registered: August 2007
Location: Dhaka
Senior Member

Solution: how to populate listitem dynamically
--------------------------------
declare
R Recordgroup;
--Here Re is the variable
--of type Recordgroup
Status number;
begin
R:=CREATE_GROUP_FROM_QUERY('R','SELECT DISTINCT(PRODUCT_NAME),PRODUCT_NAME FROM COMMODITY_GMASTER ');
IF NOT ID_NULL(R) THEN
STATUS:=POPULATE_GROUP(R);
POPULATE_LIST('CONTROL_BLOCK.PLIST',R);
END IF;
end;
-----------------------------------
i hope the above code will work

Thank you.
Previous Topic: listitem
Next Topic: running report from form
Goto Forum:
  


Current Time: Mon Dec 05 19:02:00 CST 2016

Total time taken to generate the page: 0.18757 seconds