2 Replies Latest reply on Jun 18, 2013 3:39 PM by 1005774

    ALERT code not working, need help.

    1005774

      Hello Everyone,

       

           i'm working in forms 10.1.2.0.2 and i have written some code to call an Alert when the user puts in an invalid number, however, the alert isn't poping up and the cursor will not move out of the field.  This is on a post-text script.

       

      basic:

       

      declare

        al_button number;

      al_id alert;

       

      begin

      i select 3 columns from a table based on input by the user.

      if the input is valid, then the form is populated.  This works no problem.

      however, when the following is not true, the cursor will not leave the field, but the alert will not pop up either.

       

      if v_nsn = nvl(t_rnsn, 0), then

      select the values and put them in the form.

      else  -- this is not working

      al_id := find_alert ('BAD_NSN_ALERT34');

      if Id_null(al_id) then

      message ('THE ALERT NAMED BAD_NSN_ALERT34 DOES NOT EXIST');

      RAISE FORM_TRIGGER_FAILURE;

      else

      al_button := SHOW_ALERT(al_id);

      if al_button = alert_button1 then

           ...DO SOMETHING;

      else al_button := show_alert (al_id);

      if al_button = alert_button2 then

      do something;

       

      end if;

      end if;

      end if;

      end if;

       

      end;