The purpose of the Throw Error trigger A trigger is a SQL procedure that performs an action when a transaction (INSERT, UPDATE, DELETE) occurs. You can use triggers to perform validation of input data, to automatically generate a value for a newly inserted row, to read from other tables for cross-referencing purposes, or to support alerts through e-mail messages. is to allow the user to specify a custom error message to be displayed when something goes wrong. The error can be generic or linked to a specific field. Also, this trigger can be used to start an error transaction A transaction is a group of SQL statements whose effects are logically connected. Anything from simple queries to inserting, and deleting operations can be considered a transaction, as well as more complex groups of several statements which accomplish a specific task. when a user-defined condition is not met.
This trigger is accessible from the Application panel, Server Behaviors -> + -> MX Kollection -> Forms -> Throw Error.
The user interface has two tabs. The Basic tab alone is sufficient in order to define the error message and eventually the associated transaction field, while the Advanced is only required in order to alter the list of transactions to which the trigger is registered, or the trigger's properties. Directions about the tabs correct configuration are given below.
To set the dialog box options for the first tab, follow the next steps:
The three buttons in the top right corner of the interface offer you the next functionalities:
· Click OK when you are done configuring the trigger.
· Click Cancel to exit without applying the new settings.
· The Help button opens this help page.
These buttons are common to both tabs of the Throw Error
For instructions on completing this step, see the Advanced tab. The difference is that for the Throw Error trigger, the Type drop-down menu is not read-only and it gives you the opportunity to choose the trigger type. By default, it is set to BEFORE as it should execute before the transaction takes place. Also, the Priority is by default set to 50.
Related Topics