9 Understanding Data Dictionary Triggers

This chapter contains the following topic:

9.1 Data Dictionary Triggers

Data dictionary triggers are used to attach edit-and-display logic to data dictionary items. The application runtime engine executes the trigger associated with a data dictionary item at the time that the item is accessed in a form.

Custom data dictionary triggers are written in C or Named Event Rule (NER), and require a specific data structure in order to execute correctly. The custom trigger data structure is composed of three predefined members and one variable member. The predefined members are the same for every custom trigger. The variable member is different for each trigger, and it is created using the specific data element associated with the data dictionary item.

This table shows the order of the members in the data structure along with the alias and a description of each member.

Structure Member Name Alias Description
idBhvrErrorId BHVRERRID Used by the trigger function to return the error status (ER_ERROR or ER_SUCCESS) to the application.
szBehaviorEditString BHVREDTST Used by the application runtime engine to pass the value for the data dictionary field to the trigger function.
szDescription001 DL01 Used by the trigger function to return the description for the value to the application.
szHomeCompany, mnAddressNumber HMCO, AN8 Used by the trigger function to set errors (CALLMAP field).