Re: Help on Item validation
Date: Tue, 13 Mar 2007 08:22:10 -0700
Message-ID: <1173799330.47344_at_bubbleator.drizzle.com>
nick048 wrote:
> Hi to All,
>
> I my form I have 2 Items: FROM_CODE and TO_CODE.
> The items are declared as VARCHAR2(18 BYTE) with this visualization
> format:
> 99.99.99.99.999999
>
> I have added a trigger WHEN-VALIDATE_ITEM to Item TO_CODE with this
> code:
> If :TO_CODE < :FROM_CODE then
> begin
> DISPLAY_MESSAGE('Code Error', 'From code must be < To code') ;
> raise form_trigger_failure;
> end;
> end if;
>
> For example if FROM_CODE = 00.00.01.03.071767 and TO_CODE =
> 00.00.01.03.070064, the error message is correctly displayed and the
> focus return to Item TO_CODE.
>
> If FROM_CODE = 00.00.01.03.071767 and TO_CODE is null, the trigger
> pass as valid the null code.
>
> How can resolve this problem ? I hope that someone can help me.
>
> Thank You and Best Regards
> Gaetano
IF NVL(:TO_CODE, <some_value>) < NVL(:FROM_CODE, <some_value>) THEN
or a variation on the theme.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Tue Mar 13 2007 - 16:22:10 CET