re-populate list with updated values [message #420886] |
Thu, 03 September 2009 01:03 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
annu-agi
Messages: 238 Registered: July 2005 Location: Karachi
|
Senior Member |
![annu-agi](/forum/theme/orafaq/images/yahoo.png) ![anwerrasool](/forum/theme/orafaq/images/google.png)
|
|
hi experts,
I have stuck in one problem please guide me to out of this.
well i have a form where on i declare some populate list item in WHEN_NEW_FORM_INSTANCE trigger
the coding is like that
declare
rg_name1 VARCHAR2 (40) := 'occurance_group';
rg_id1 RecordGroup;
errcode1 NUMBER;
It_Id1 Item;
tp_whr varchar2 (2) := ' / ';
begin
rg_id1 := Find_Group (rg_name1);
IF Id_Null (rg_id1) THEN
rg_id1 :=
Create_Group_From_Query
(rg_name1,
'select event_occurance_heading ||'
|| chr (39)
|| tp_whr
|| chr (39)
|| '||event_occurance_type, to_char(event_occurance_id) into '
|| ':event_mst.event_occurance_type from event_occurance_mst');
End if;
errcode1 := Populate_Group (rg_id1);
It_Id1 := find_item ('event_mst.event_occurance_type');
Populate_List (It_Id1, rg_id1);
execute_query;
end;
now you can see i make one list item on form and populate it programatically.
it runs successfully with no issues. i can select items from list and update my form. if i want to update my list with some more items, missing from this populated list. for that i have one more form which directly input in the master table of corrusponding table of the list query. for that i made one button which run new form and enable me to input and update records and exiting from this form get back to me at populated list item ..
now i would like to see my populated list item with updated data.
see the code below for WHEN_BUTTON_PRESS
declare
rg_name1 VARCHAR2 (40) := 'occurance_group';
rg_id1 RecordGroup;
errcode1 NUMBER;
It_Id1 Item;
tp_whr varchar2 (2) := ' / ';
BEGIN
CALL_FORM ('k:\forms\event_occurance_mst.fmx', no_hide, no_replace,
NO_query_only);
rg_id1 := Find_Group (rg_name1);
IF not Id_Null (rg_id1) THEN
Delete_Group (rg_id1);
end if;
rg_id1 := Find_Group (rg_name1);
IF Id_Null (rg_id1) THEN
:event_mst.event_occurance_type := null;
rg_id1 :=
Create_Group_From_Query
(rg_name1,
'select event_occurance_heading ||'
|| chr (39)
|| tp_whr
|| chr (39)
|| '||event_occurance_type, to_char(event_occurance_id) into '
|| ':event_mst.event_occurance_type from event_occurance_mst');
End if;
errcode1 := Populate_Group (rg_id1);
It_Id1 := find_item ('event_mst.event_occurance_type');
Populate_List (It_Id1, rg_id1);
END;
Now the problem is when i run this form everything is run fine and list populated with item for the first time. but when i add new records in the corrusponding list query table and get back to form it wont be update .. while you can see i use delete_group too .. but it wont work ..
any idea ..
how can i update or re-populate my list item .
regards
Annu [EDITED by DJM: formatted the code and removed superfluous blank lines]
[Updated on: Mon, 21 September 2009 23:51] by Moderator Report message to a moderator
|
|
|
|
|