update list item [message #380279] |
Sat, 10 January 2009 02:42  |
shahzaib_4vip@hotmail.com
Messages: 410 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   |
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   |
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   |
shahzaib_4vip@hotmail.com
Messages: 410 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  |
 |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS 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
|
|
|