10 Replies Latest reply: Jan 15, 2013 12:01 PM by 982158 RSS

    verification an item manually

    982158
      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"