× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thank you for your detailed reply, Buck. I agree with the idea of
using a "Trigger Mediator". I would send *ESCAPE message from the
Mediator rather than the "Trigger Handler". But I would only use an
*ESCAPE message to STOP an Insert/Update/Delete and flag an error
condition - not to communicate with a previous call-stack entry.

Too many opportunities for the call-stack to contain something
different what your Trigger Mediator or subsequent Handler might
expect.

Did you have a chance to look at the Data export example in my
previous message? Error handling would be simpler, and the interface
would be bullet-proof.

In the Trigger Handler:

if trg.aft.email = *blanks; // user didn't fill in an email account?
trg.msg.type = type_error;
trg.msg.column = 'EMAIL';
trg.msg.text = 'Please fill in an email address, which is a required field';
trg.esc = *on;
return;
endif;

In the Application:

write(e) myrec;

if %error() and trg.esc;
... process trg.msg values (ie. show error on screen)...
endif;

...

No messy call stacks to deal with.

HTH,

Nathan.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.