Oracle Forms popup dialog alert box

Howto create a popup dialog box in Oracle Forms – called ‘alerts’ although can be used for all kinds of purposes, not just alerting.

First create a new alert. Alerts are listed in the forms developer object navigator, immediately underneath Triggers. You can specify text and button names in the property palette of this new alert:

Forms Alert

Then this new alert operates like a function, so you can call it in e.g. when-button-pressed triggers like this:

BEGIN
  -- Prompt user with a message dialog box, and only proceed with the delete if they click 'ok'
  IF show_alert('alert_confirm_delete') = alert_button1
  THEN
    DELETE FROM phototable WHERE id = :myblock.myid ;
  END IF ;
END ;
Posted in Oracle forms
10 comments on “Oracle Forms popup dialog alert box
  1. Claudio Hernrique says:

    vlw Demais!
    thank you! I need this dialog!!!
    chenpes!

  2. fayaz says:

    i am having one create item button if i click it item is created . but i need to get a pop up message whether it is success r any error in the procedure i should get a message when ever i run the form.

  3. raghu says:

    Hi
    You can mention message as message(‘Hello World’); in When_New_Form_Instance

  4. Frank says:

    Thank You!

  5. surendra says:

    Thanks…
    This post help me create the alert message.

    Regards,
    Surendra

  6. Nasir says:

    Hi Dear!

    i used this process it is worked properly. Thank you so much

    Regard
    Nasir

  7. atif zubair says:

    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/

  8. Rupom says:

    BEGIN
    I user this on a save data form

    IF show_alert(‘SAVE_BUTTON_PRESSED’) = alert_button1
    THEN
    commit_form;

    clear_form;

    END IF ;
    END ;

  9. Suraj says:

    Thank you :). Worked perfectly.

  10. Teresa says:

    Is there some type of run-time parameter associated with displaying alerts? Or is there some type of user/role privilege associated with displaying alerts? When I run the form with the owner privileges, I can see all the alerts during the record validation. But, when I run the app with one of the user roles, no alerts show. Record validation still happens, but the only message that appears is a cryptic WHEN-VALIDATE-RECORD error, not the alert that tells the user exactly what is wrong. Do you have any advice? I have never run across this before.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>