Counting Dependent Records

The number of activities stored for a company should be entered in a free field in the company record. Each time a change is applied to the Activity info area, the number should be recalculated.

  1. Define the following trigger:


  2. Define the following reference:


    Only those records are counted that are dependent on the current record (Root info area column).

  3. Save the trigger.
  4. Switch to the Rights info area.
  5. Click in the Triggers cell for the Activity info area.
  6. Define the following database event:

  7. Save the access rights and assign it (to a station).

Each time a activity is edited, deleted or added, the number of records stored for the parent company is written to the FreeN1 field in the company record.