Showing posts with label Oracle forms Triggers. Show all posts
Showing posts with label Oracle forms Triggers. Show all posts

Lov Query for Oracle forms

how to apply Lov query on button or at any event;--
--
or How to call lov from a button or else; --
-------------------------------------------------------------
Example1:
if show_lov('lov_name') then
null;
end if;

Example2:
declare
a boolean;
begin
a:=show_lov('lov_name');
end;

------------------------------------------------------------

Timer Example In Oracle forms

Timer For Oracle forms 6i 9i 10g

The When-Timer-Expired trigger fires when a timer you have previously created in your form, expires.


For example, you create a timer in the when-button-pressed trigger of a button, like this:

DECLARE
timer_id Timer;
one_minute NUMBER(5) := 60000;
BEGIN
timer_id := CREATE_TIMER('emp_timer', one_minute, NO_REPEAT);
END;


60 seconds after the user presses the button, the When-Timer-Expired will fire, and its code will be executed.

When you create more than one timer, you need to check which of your timers expired, because the same trigger will fire, no matter which timer expired. You can use the GET_APPLICATION_PRPERTY built-in for that purpose.

Something like this:

Applied this on when-timer-expired trigger -----------------------

if get_application_property(TIMER_NAME) = 'EMP_TIMER' then
message('timer EMP_TIMER expired');
-- Do something else...
end if;