1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| function custom_alert
(msgno in varchar2)
return number
is
msg_string varchar2(200);
msg_title varchar2(32);
alert_is alert;
alert_bouton number;
mypos pls_integer;
BEGIN
begin
select libelle into msg_string
from ma table_d_alertes where ID = msgno;
exception
when others then
msg_string := msgno;
end;
alert_is := find_alert('NOM_DE_MON_OBJET_ALERT');
msg_title := 'ATTENTION : ';
if (not id_null(alert_is))
then
set_alert_property(alert_is, TITLE, msg_title);
set_alert_property(alert_is, ALERT_MESSAGE_TEXT, msg_string );
alert_bouton := show_alert(alert_is);
else
message(msg_string);
end if;
return(alert_bouton);
END; |