Modifying Triggers

PowerDesigner provides various methods for editing a trigger.

You can:
  • Edit the code directly in the Definition tab of its property sheet.

  • Attach a predefined trigger template or create and attach your own reusable trigger templates

  • Insert predefined trigger template item code or create your own reusable trigger template items

Note: If you modify the definition of a DBMS trigger template or template item, you are modifying the DBMS definition file. We recommend that you only ever work on a copy of the original DBMS definition file.
  1. Open the trigger property sheet in one of the following ways:
    • Open the relevant table property sheet click the Triggers tab, select the trigger in the list, and then click the Properties tool.
    • Select Model > Triggers > Triggers to open the List of Triggers, select the trigger in the list, and then click the Properties tool.
    • In the Browser, right-click the entry for the trigger and select Properties.
  2. Click the Definition tab to display the trigger code.


  3. Enter the trigger definition code. You can attach a trigger template, add template items, use PDM variables and macros and various other tools available from the toolbar (see SQL Editor Tools).

    The trigger will be marked as user-defined and will be excluded from most forms of rebuilding (see Rebuilding Triggers), if you select the "Preserve" mode.

  4. You can also modify the trigger's other properties (see Trigger and DBMS Trigger Properties).
  5. Click OK in each of the dialog boxes.