Re: URGENT! Help required with POST-FORMS-COMMIT

From: Pro <martin_at_lyndale.freeserve.co.uk>
Date: Sat, 5 Jun 1999 14:33:38 +0100
Message-ID: <7jdf40$8pf$2_at_news4.svr.pol.co.uk>


Hi thanks for your help. However I have resolved the problem. As part of commit processing there was a FORMS_DDL issued, which of cource implicitly commits.

Thanks

<rtproffitt_at_my-deja.com> wrote in message news:7j0vat$86f$1_at_nnrp1.deja.com...
> I am wondering if the error is not propagating properly.
>
> 1. Try a test of moving the Raise Form-trigger-failure to the
> body of the trigger.
>
> 2. Try a test of adding an exception clause to the trigger, and
> passing the failure onward when the Msg_Alert raises the error.
>
> Exception
> when Form-trigger-failure then
> RAISE;
> end;
>
> Good Luck
> Robert Proffitt
>
> In article <7j01o4$745$1_at_taliesin.netcom.net.uk>,
> "Maria T" <martin.proctor_at_DELETEcapgemini.co.uk> wrote:
> > Hi,
> >
> > I have a 2 block master detail form which allows entries of multiple
> > divisions against a user. One of the divisions entered must be
> assigned
> > as primary division via a check box. the validation ensures that one
> and
> > not more, of the divisions has been assigned as the primary divsion.
> >
> > i have done this via POST-FORMS-COMMIT trigger. Code as follows
> >
> > DECLARE
> > vPrimaries NUMBER := 0;
> > BEGIN
> > SELECT COUNT(*)
> > INTO vPrimaries
> > FROM ye2_user_divisions
> > WHERE user_id = :YE2_COPS_USERS.user_id
> > AND primary_division = 'Y';
> >
> > IF vPrimaries = 0
> > THEN
> > Msg_Alert('You must assign a primary division');
> > ELSIF vPrimaries > 1
> > THEN
> > Msg_Alert ('User may only be assigned one primary division');
> > END IF;
> > END;
> >
> > On first commit the error is trapped as expected. However if details
> > commited a second time the details in the top block are commited even
> > tho the validation fails. (The Procedure Call Msg_Alert uses RAISE
> > FORM_TRIGGER_FAILURE). Why is this?
> >
> > Any suggestions as to alternative method of achieving this would also
> be
> > appreciated.
> >
> > TIA
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Sat Jun 05 1999 - 15:33:38 CEST

Original text of this message