Home » Developer & Programmer » Forms » update list item (10g,Developer 6I,Window XP)
icon1.gif  update list item [message #380279] Sat, 10 January 2009 02:42 Go to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
i have 2 block emp and dept


Well i create a list item of emp.dept_no


now i want when ever i save new deptno in dept block the list will update with new dept no

Right now the list is not updating deptno in emp block


Thanks


Shahzaib Ismail
Re: update list item [message #380285 is a reply to message #380279] Sat, 10 January 2009 03:11 Go to previous messageGo to next message
dhanuka.rajesh
Messages: 49
Registered: March 2008
Location: Mumbai
Member
CREATE_GROUP_FROM_QUERY('Group Name','select Description , List Value from Table WHERE Clause');

At run time you can populate list item with data from query.

You can read more about create_group_form_query in forms help document.


------------------------------------
group1_id := Create_Group('GROUP NAME');
/*** Add two columns to the new group, using group1_id to **
identify the group and then retrieve the list item values**
into the record group.*/

col11_id := Add_Group_Column(group1_id,'col11',CHAR_COLUMN,50);
col22_id := Add_Group_Column(group1_id,'col22',CHAR_COLUMN,50);
Add_Group_Row(group1_id,1);
Add_Group_Row(group1_id,2);
Retrieve_List(ITEM_ID, 'LIST_LANG');
------------------------------------



Best Regards,

Dhanuka. Rajesh
Re: update list item [message #380286 is a reply to message #380279] Sat, 10 January 2009 03:13 Go to previous messageGo to next message
dhanuka.rajesh
Messages: 49
Registered: March 2008
Location: Mumbai
Member
However note the following:

When at run time you are changing values of list item that is DATABASE ITEM.

List values cannot be changed when forms status is Query, Changed.

Hope this helps you.


Best Regards,

Dhanuka. Rajesh
Re: update list item [message #380321 is a reply to message #380279] Sat, 10 January 2009 12:13 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Thanks for your reply dhanuka.rajesh

Well i already create a list item just like this


Declare
rgname1 varchar2(40) :='dept_rec';
status1 number;
rgroup1 recordgroup;
Begin
rgroup1 := create_group_from_query (rgname1,'select
to_char(ITEM_NO),to_char(ITEM_NO) ITEM_NO from ITEM2 ORDER BY 1');
status1:=populate_group(rgroup1);
clear_list('supplier_id');
populate_list('purchase2.supplier_id_pur',rgroup1);
end;


its working fine but there are 2 problem with this list value

the first is when i insert a record in supplier table its record will not show me on purchase table supplier_id_pur list

and the 2nd problem is

That i have a list of number like 4000 to 9000

when i press 4 its show me 4000 when i press 45 its show me 5000 series

Hope you understand my problem


Any way

Thanks for reply


Shahzaib Ismail
Re: update list item [message #380446 is a reply to message #380321] Sun, 11 January 2009 23:41 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I suggest creating your 'record_group' and 'LOV' via Forms Builder. They are simpler and Oracle Forms looks after the details.

David
Previous Topic: Send mail with logo visible
Next Topic: getting Machine Information
Goto Forum:
  


Current Time: Mon Dec 05 15:06:03 CST 2016

Total time taken to generate the page: 0.11009 seconds