Re: Where best to validate multi-row block

From: Jerry Alan Braga <jabraga_at_flanagan.ca>
Date: Fri, 23 Jul 2004 15:57:01 GMT
Message-ID: <hzaMc.110084$eO.58402_at_edtnps89>


[Quoted] [Quoted] I use pre-commit trigger. It will allow global validations for anything in your form. If you raise form trigger failure then the whole commit process is stopped. And this is before any of the internal pre-post checks of forms against the database.

What I have done is created a generic pre-commit trigger at the form level and from there call a function called form_validate. If this function returns false then the pre-commit trigger fails out, by default the function returns true.

By doing it this way I can have a standard template form in which any developer can override their own local copy of function form_validate and insert specific form level checks.

"Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message news:1090543259.802979_at_yasure...
> Roy Munson wrote:
>
> > Hi,
> >
> > Have a 2 block parent child form....the child block is multi row in
> > which a number of pieces can be entered for each row.
> >
> > A total value is entered in the parent block....am wanting to validate
> > that the sum of the numbers entered in the child block does not exceed
> > the value entered in the parent block.
> >
> > Where is the best place to put the validation? PRE-INSERT is no good
> > as data still not posted. POST-INSERT no good as its too late for
> > validation to fail and rollback.
> >
> > Any help appreciated
> >
> > Roy
>
> I use WHEN-VALIDATE-ITEM.
>
> Daniel Morgan
>
Received on Fri Jul 23 2004 - 17:57:01 CEST

Original text of this message