Home » Developer & Programmer » Forms » Update
Update [message #119000] Tue, 10 May 2005 03:34 Go to next message
jonmich005
Messages: 53
Registered: April 2005
Member
I have an LOV and it is called in a when_button_pressed-trigger.

But in this trigger I need to add teh activity to another table that also uses this activity.
Is this possible by an insert-statement?

I have tried the following but it doesn't show the activity if I go to the other form:

insert into lds_interval_tasklist values(:global.vehicle,:global.scenario,:global.t,:lds_interval_tasklist.itl_id,:lds_interval_tasklist.itl_activity,:tl_grid_area_id, 'T');
commit;
Re: Update [message #119013 is a reply to message #119000] Tue, 10 May 2005 05:11 Go to previous messageGo to next message
subba lakshmi
Messages: 36
Registered: March 2005
Member
in this table lds_interval_tasklist what are the values that are brought from lov.and you are using some global variables better use parameters instead of them to increase the performance in terms of memory, if possible.

i think it is better to elabarate about your problem.

from
subba lakshmi
Re: Update [message #119017 is a reply to message #119013] Tue, 10 May 2005 05:17 Go to previous messageGo to next message
jonmich005
Messages: 53
Registered: April 2005
Member
I use the activity from the LOV,but if I sleect the other values into global variables it shouldn't be a problem or does it?

I have a LOV with the activities and this is my trigger:

create_record;
go_item('tl_grid_activity');
if form_success then
list_values;
end if;
--to receive the last gridnummer of a certain vehicle
select max(tl_grid_id)+1
into :lds_tl_grid.tl_grid_id
from lds_tl_grid
where tl_grid_veh_id = :global.vehicle;

select :global.vehicle
into :lds_tl_grid.tl_grid_veh_id
from sys.dual;

select :global.scenario
into :lds_tl_grid.tl_grid_scen
from sys.dual;

--to save the acvtivity into the lds_tl_grid table
commit_form;
execute_query;

select max(itl_id)+1
into :lds_interval_tasklist.itl_id
from lds_interval_tasklist
where itl_veh_id = :global.vehicle
and itl_int_id = :global.t;

select lds_tl_grid.tl_grid_activity|| ' ' ||:global.aname
into :lds_interval_tasklist.itl_activity
from lds_tl_grid
where tl_grid_veh_id = :global.vehicle
and tl_grid_id = :tl_grid_id;



insert into lds_interval_tasklist values(:global.vehicle,:global.scenario,:global.t,:lds_interval_tasklist.itl_id,:lds_interval_tasklist.itl_activity,:tl_grid_area_id, 'T');
commit;

Under the commit_form is the thing that doesn't work.
It does everything in my lds_tl_grid table but in the lds_interval_tasklist it doesn't.
Do you see what's theproblem?
Re: Update [message #119159 is a reply to message #119000] Tue, 10 May 2005 20:12 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
'Commit' does a forms_commit. IF there has been no changes in your FORM then the system will NOT do a commit. Use 'standard.commit' this bypasses the form decision logic.

David
Previous Topic: Push button disables property.
Next Topic: Form Security Features
Goto Forum:
  


Current Time: Thu Sep 19 18:10:29 CDT 2024