This discussion is archived
10 Replies Latest reply: Jan 15, 2013 10:01 AM by 982158 RSS

verification an item manually

982158 Newbie
Currently Being Moderated
Hi,
I want to check an item manually.
Here is the code:
//when-validate-item

declare
     i number;

begin
if :a.b is null then
     i:=show_alert('null');
     
else if :a.b between 1900 and 2013 then
     message('date valid');
else
     i:=show_alert('date_invalid');
     :a.b:=null;
     raise form_trigger_failure;     

end if;
end if;

exception when others then
          i:=show_alert('exception');
          
          end;

the problem for example when I entered a value "3000" I received two messages (the first on the alert "date_invalid" and the 2nd on the exception message)
but normally I must received one message, the relative "date_invalid"

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points