|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Doing Validation before CommitHi 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 Elie Constantine wrote:
Show quote > Hi all, I am so very happy for you.> > 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 -- Daniel A. Morgan University of Washington damor***@x.washington.edu (replace 'x' with 'u' to respond) 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. Elie Constantine wrote:
Show quote > That didn't solve my problem It wasn't intended to solve your problem. It was intended to> > 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. 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) 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, elie.constant***@gmail.com wrote:
> Ok... Sorry for any inconveniences. No ... it is a procedure not a trigger. Write:> > 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, 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) 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;
Other interesting topics
|
|||||||||||||||||||||||