Tuesday, April 5, 2011

Alert in Oracle Forms for User Response


Step1:

Define alert in forms.



Step2:

Use below code to raise alert.
DECLARE
   al_id       alert;
   al_button   NUMBER;
BEGIN
   al_id := FIND_ALERT ('TEST_ALERT');
   al_button := SHOW_ALERT (al_id);

   IF al_button = alert_button1
   THEN                                          -- Alert_button1 value is OK
      --<<--Your Condition-->>
      NULL;
   ELSIF al_button = alert_button2
   THEN
                                         -- Alert_button1 value is Cancel
      --<<--Your Condition-->>
      RAISE form_trigger_failure;
   END IF;
END;

No comments:

Post a Comment