Home All Groups Group Topic Archive Search About

Doing Validation before Commit

Author
30 Nov 2004 2:16 PM
Elie Constantine
Hi all,

I have a form with 2 data blocks joined in a 1 to many relationship.

when the user want to save the form. a procedure will run, do some
checking and decide if everything ok on the details level.

If everything ok it will continue else it will prohibit the user from
doing save by calling FORM_TRIGGER_FAILURE.

At which level and using which trigger the FORM_TRIGGER_FAILURE must
be called.


Thanks

Author
30 Nov 2004 4:06 PM
DA Morgan
Elie Constantine wrote:
Show quote
> Hi all,
>
> I have a form with 2 data blocks joined in a 1 to many relationship.
>
> when the user want to save the form. a procedure will run, do some
> checking and decide if everything ok on the details level.
>
> If everything ok it will continue else it will prohibit the user from
> doing save by calling FORM_TRIGGER_FAILURE.
>
> At which level and using which trigger the FORM_TRIGGER_FAILURE must
> be called.
>
>
> Thanks

I am so very happy for you.
--
Daniel A. Morgan
University of Washington
damor***@x.washington.edu
(replace 'x' with 'u' to respond)
Author
1 Dec 2004 11:42 AM
Elie Constantine
That didn't solve my problem

Thanks anyway for trying to help

DA Morgan <damor***@x.washington.edu> wrote in message news:<1101830675.193129@yasure>...
Show quote
> Elie Constantine wrote:
> > Hi all,
> >
> > I have a form with 2 data blocks joined in a 1 to many relationship.
> >
> > when the user want to save the form. a procedure will run, do some
> > checking and decide if everything ok on the details level.
> >
> > If everything ok it will continue else it will prohibit the user from
> > doing save by calling FORM_TRIGGER_FAILURE.
> >
> > At which level and using which trigger the FORM_TRIGGER_FAILURE must
> > be called.
> >
> >
> > Thanks
>
> I am so very happy for you.
Author
2 Dec 2004 1:04 AM
DA Morgan
Elie Constantine wrote:
Show quote
> That didn't solve my problem
>
> Thanks anyway for trying to help
>
> DA Morgan <damor***@x.washington.edu> wrote in message news:<1101830675.193129@yasure>...
>
>>Elie Constantine wrote:
>>
>>>Hi all,
>>>
>>>I have a form with 2 data blocks joined in a 1 to many relationship.
>>>
>>>when the user want to save the form. a procedure will run, do some
>>>checking and decide if everything ok on the details level.
>>>
>>>If everything ok it will continue else it will prohibit the user from
>>>doing save by calling FORM_TRIGGER_FAILURE.
>>>
>>>At which level and using which trigger the FORM_TRIGGER_FAILURE must
>>>be called.
>>>
>>>
>>>Thanks
>>
>>I am so very happy for you.

It wasn't intended to solve your problem. It was intended to
convey the fact that you didn't provide enough information
from which a response could be formulated.

The obvious point to raise an error is in the procedure. So
why you are asking questions about triggers is not clear.
--
Daniel A. Morgan
University of Washington
damor***@x.washington.edu
(replace 'x' with 'u' to respond)
Author
2 Dec 2004 12:36 PM
elie.constantine
Ok... Sorry for any inconveniences.

The FORM_TRIGGER_FAILURE call will be in the procedure.
But from which trigger I should make a call to this procedure. In the
POST-FORM, KEY-COMMIT, ON-COMMIT.....????? This procedure can also be
written to post the details data block, do the check then in case some
rules were not met raise the error and prohibit the data in both master
and detail blocks from been committed.


Regards,
Elie,
Author
2 Dec 2004 2:35 PM
DA Morgan
elie.constant***@gmail.com wrote:
> Ok... Sorry for any inconveniences.
>
> The FORM_TRIGGER_FAILURE call will be in the procedure.
> But from which trigger I should make a call to this procedure. In the
> POST-FORM, KEY-COMMIT, ON-COMMIT.....????? This procedure can also be
> written to post the details data block, do the check then in case some
> rules were not met raise the error and prohibit the data in both master
> and detail blocks from been committed.
>
>
> Regards,
> Elie,

No ... it is a procedure not a trigger. Write:

BEGIN
   .. your code here
EXCEPTION
   WHEN <some_condition> THEN
     .. whatever you wish
END;

--
Daniel A. Morgan
University of Washington
damor***@x.washington.edu
(replace 'x' with 'u' to respond)
Author
4 Dec 2004 12:03 PM
Elie Constantine
Great!

so let's suppose I put this code in a procedure called
Test_Before_Save

BEGIN
    .. your code here
EXCEPTION
    WHEN <some_condition> THEN
      .. whatever you wish
END;


Now where can I call the Test_Before_Save procedure from?

Should I do it from the KEY-COMMIT trigger on the form level or from
the KEY-COMMIT trigger on the detail datablock level or from the
master datablock level.

Or should I call it from another trigger like POST-FORM...

Regards,

Elie,



DA Morgan <damor***@x.washington.edu> wrote in message news:<1101998063.564651@yasure>...
Show quote
> elie.constant***@gmail.com wrote:
> > Ok... Sorry for any inconveniences.
> >
> > The FORM_TRIGGER_FAILURE call will be in the procedure.
> > But from which trigger I should make a call to this procedure. In the
> > POST-FORM, KEY-COMMIT, ON-COMMIT.....????? This procedure can also be
> > written to post the details data block, do the check then in case some
> > rules were not met raise the error and prohibit the data in both master
> > and detail blocks from been committed.
> >
> >
> > Regards,
> > Elie,
>
> No ... it is a procedure not a trigger. Write:
>
> BEGIN
>    .. your code here
> EXCEPTION
>    WHEN <some_condition> THEN
>      .. whatever you wish
> END;

AddThis Social Bookmark Button

Post Other interesting topics