Creating a Trigger from a Template

You can create a trigger based on one of the PowerDesigner templates or on a template of your own.

  1. Double-click a table symbol to open its property sheet, and then click the Triggers tab.
  2. Click the Add a Row tool to create a new trigger, and type a name and code.
  3. Click Apply to commit the creation of the new trigger, and then click the Properties tool to open its property sheet.
  4. Click the Definition tab, and select a trigger template from the Template list.

    The time and event fields will be set and the template code copied into the definition box.



  5. [optional] Modify the trigger definition code. You can add trigger template items, use PDM variables and macros and various other tools available from the toolbar (see SQL Editor Tools).

    If you edit the code, then the trigger will be marked as user-defined and will be excluded from most forms of rebuilding (see Rebuilding Triggers).

  6. You can also modify the trigger's other properties. For a full list of the properties available, see Trigger Properties.
  7. Click OK in each of the dialog boxes.