Build complex conditions

To have a trigger A trigger is a SQL procedure that performs an action when a 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. (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. start its action only when a certain condition has been met, you can use the condition property found on the Advanced tab of all trigger user interfaces. To define the condition however, there are two ways:

  1. Type the condition in the text-field.
  2. Press the Build condition button to open the Condition Builder dialog box.

The Condition Builder allows building conditions from either static or dynamic data The InterAKT Dynamic Data tool is a replacement for the standard dynamic data dialog. It is used in the MX Kollection 3, to provide a unified way of building mark-ups, or place holders. These are recordset fields, server or session variables, and other types of dynamic data that are replaced at runtime by their corresponding values, using an intuitive interface and generating all the required code for you. If you need more complex conditions, simply switch to the Advanced tab, and you can enter it.

The dialog box is divided into two tabs:

The Basic tab

To set the dialog box options, follow the next steps:

 

  1. In the Expression 1 text box enter the condition's first element. You can use the InterAKT Dynamic Data (the lighting bolt icon) to build this expression.
  2. From the Condition drop-down menu select the operator used to compare the two expressions.
  3. In the Expression 2 text box, enter the second element of the condition. You can also use the InterAKT Dynamic Data to build this expression.
  4. The three buttons in the top right corner of the interface offer you the next functionalities:
    ·  Click OK when you are done configuring the dialog box.
    ·  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 Condition Builder interface.

  5. Click on the Advanced tab to build more complex conditions.
Note: If you prefer writing the code yourself in the Expression 1 and Expression 2 fields, please make sure the code is correct and appropriate for the server model The server model is the Dreamweaver term for your combination of the scripting language and/ or databas A database refers to data organized and stored on a computer that can be searched and retrieved by a computer program. Most industrial-strength and many smaller database applications can be addressed using SQL (Structured Query Language).e software used for development on your server, for instance PHP_MySQL, ASP.NET, ASP VBScript, ColdFusion, etc. InterAKT extensions generate server side code. Therefore, setting the correct server model in your site definition is important so that extensions generate the proper code for your development framework. you use (ColdFusion, PHP_MySQL, PHP_ADODB, ASP_VBScript etc.).

The Advanced tab

To set the dialog box options, follow the next steps:

 

  1. In the Expression text area you can see the condition set in the Basic tab. You can make it as complex as you want by using other variables, constants, operators.

  2. Click OK when you are done building the condition.

Note: When switching from the Advanced tab to the Basic one, if the condition is simple enough, it will be recognized, and the respective fields will be filled in automatically.

Related Topics