anumoses
asked on
oracle forms question
Have this code
select count(*) into v_count
from day_off_sched
where schedule_code = :day_off_sched.schedule_co de;
If v_count > 0 then
msgbox.show('Schedule Error ', 'The Schedule you entered already exixts.', 'OK');
:day_off_sched.schedule_co de := null;
raise form_trigger_failure;
Else
go_item('day_off_sched.des cription') ;
End if;
-----------
I want this code to fire only on inserting record . not when we query records .
I have this code on key-enter of the schedule code.
select count(*) into v_count
from day_off_sched
where schedule_code = :day_off_sched.schedule_co
If v_count > 0 then
msgbox.show('Schedule Error ', 'The Schedule you entered already exixts.', 'OK');
:day_off_sched.schedule_co
raise form_trigger_failure;
Else
go_item('day_off_sched.des
End if;
-----------
I want this code to fire only on inserting record . not when we query records .
I have this code on key-enter of the schedule code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if new record create didn't work, did you try when new record instance?
ASKER
when-new-record-instance did not work either.
ASKER
thanks
ASKER
My code is
Declare
v_count number;
Begin
select count(*) into v_count
from day_off_sched
where schedule_code = :day_off_sched.schedule_co
If v_count > 0 then
msgbox.show('Schedule Error ', 'The Schedule you entered already exixts.', 'OK');
:day_off_sched.schedule_co
raise form_trigger_failure;
Else
go_item('day_off_sched.des
End if;
End;