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 from the list, and then click the Properties tool
    • Select Model > Triggers > Triggers to open the List of Triggers, select the trigger from the list, and then click the Properties tool
    • In the Browser, find the entry for the trigger, right-click it, and select Properties from the contextual menu
  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. For a full list of the properties available, see Trigger Properties.
  5. Click OK in each of the dialog boxes.