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 ;
March 18, 2011

  • 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.

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

  • Thanks…
    This post help me create the alert message.

    Regards,
    Surendra

  • Hi Dear!

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

    Regard
    Nasir

  • 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 ;

  • 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.

  • Hi Guys.
    Is there any way to disable “Yes” button only in the alert box so that user is forced to click on “No” button.
    There is some requirement in our application so that Yes button is not pressed even mistakenly.

  • Leave a Reply

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