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;

1 comment:

  1. We have developed a smart library for alerts having multiple options (alert, warning, stop). Very helpful for developers to avoid complicated and repeated coding.
    you may visit at …
    http://software.visititech.com/developer-tools/oracle-forms-6i-alerts-library/

    ReplyDelete