Show_alert is used to display model window messages in Oracle Forms and Find_alert searches the list of valid alerts in Form Builder, when the given alert is located, the subprogram returns an alert ID. You must return the ID to an appropriately typed variable, define the variable with a type of Alert.

Example
Show a user-warning alert. If the user presses the OK button, then make REALLY sure they want to continue with another alert.

See also: Display Modal Window Messages Using Alerts
 http://www.foxinfotech.in/2015/02/using-single-alert-for-messages-and-confirmation-messages.html

[code type="PL/SQL"]Declare
   al_id       alert;
   al_button   NUMBER;
BEGIN
   al_id := FIND_ALERT ('user_warning');

   IF ID_NULL (al_id)
   THEN
      MESSAGE ('user_warning alert does NOT exist');
      RAISE form_trigger_failure;
   ELSE
      /*
      ** Show the warning alert
      */
      al_button := SHOW_ALERT (al_id);

      /*
      If user pressed OK (button 1) then bring up another alert to confirm -- button mappings are specified in the alert design
      */
      IF al_button = alert_button1
      THEN
         al_id := FIND_ALERT ('are_you_sure');

         IF ID_NULL (al_id)
         THEN
            MESSAGE ('the alert NAMED:are you sure ? does NOT exist');
            RAISE form_trigger_failure;
         ELSE
            al_button := SHOW_ALERT (al_id);

            IF al_button = alert_button2
            THEN
               -- do some task
               erase_all_employee_records;
            END IF;
         END IF;
      END IF;
   END IF;
END;[/code]
Follow to get notifications for tutorials with free source code, thanks.


Show_Alert and Find_Alert in Oracle Forms

Reviewed by Mridula Joshi on

Mar 22

Rating:
5

Ask Your Questions By Comment Below.

How to use find_alert and show_alert built in oracle form example.

Post a Comment

V. Kapoor

{picture#https://3.bp.blogspot.com/-q3wCssWUHo8/ViDFfCpPEuI/AAAAAAAAD0M/MHPvgnl3T3U/s1600/authpic.JPG} Vinish Kapoor is a Software Consultant, currently working in a reputed IT company in Noida, India and doing blogging on Oracle Forms, SQL and PLSQL topics. He is an author of an eBook Oracle Forms Recipes, which is available on Google play. {facebook#https://www.facebook.com/foxinfotech2014} {twitter#https://twitter.com/foxinfotech} {google#https://plus.google.com/u/0/+VKapoor/posts}
Fox Infotech. Powered by Blogger.