Audit Trail

The VPM Enterprise audit trail is a system management tool that VPM Enterprise builds into the forms you create. The audit trail tracks a userís:

∑       Field data changes.

∑       Record additions.

∑       Record deletions.

At least one of a fieldís audit trail option field properties (Add, Change or Delete) must be checked before the fieldís data changes are included in any part of the audit trial. By default all audit trail field option properties are checked. See Field Audit Trail Options Property.

You reach the Audit Trail form from the PM-Admin menu or from the Admin menu of an application. The Audit Trail form lets you view each userís audit trail records.

Find Form

System tables are accessed using parameterized views that can become remote views in a client-server application. Therefore, when you access a system form, a custom SQL Find Form appears to let you select the records you wish to view.

On the Find form, you can select:

∑       Date Range: Enter a date range of records to select.

∑       Users - All: If youíve turned on User Access Security in your application, you can view records for all users who have run the application by clicking the All option button in the Users box.

∑       Origins - All: If the application is sharing its audit trail file with another application, you can view records for all applications by clicking the All option button in the Origins box.

Tip: The Audit Trail form allows you to print the Audit Trail report for the records you select via the Find form. Therefore, if you wish to print the Audit Trail report for a select group of Audit Trail records, be sure to select the records you want via the Find form.

Make your selections and a list grid will appear from which you can select the record to view first.

Audit Trail Form

When the Audit Trail form appears, the records selected are shown in descending order of the time and date the record was created. The Audit Trail records through which you can navigate are those in the group you selected via the Find form.

You can:

∑       Order: Change the order to ascending through the Order button on the Form Toolbar.

∑       Form Controls: You cannot edit or add records but you can delete them.

You use the information on the Audit Trail form to monitor data changes.

Tip: If audit trail security is critical in the application youíre building, you may want to disable the delete control for the applicationís Audit Trail form.

The following table explains the fields on the Audit Trail form.

Fields

Contents

User ID

Blank if User Access Security is not on in the application; otherwise, contains the ID of the user who made the data change.

Origin

The Origin entry from the Options - Environment form in VPME, or if blank, the 3-character prefix, of the application that experienced the data change.

Action

Type of data change: field change, add record or delete record.

Date/Time

Date and time the data change occurred.

Database Name

Name of the database or CursorAdapter library that contains the table, view or CursorAdapter that experienced the data change.

Table/View Name

Name of the table, view or CursorAdapter that experienced the data change.

Field Name

Name of the field that was changed.

Key Value

Value of the primary key in the record that was changed.

Old Value

Contents of the field before the data change.

New Value

Contents of the field after the data change.

Print Audit Trail

Click the Print Audit Trail button to print the Audit Trail report for the records you selected via the Find form. VPME displays the Report Setup dialog to allow you to customize the report before printing.

Controlling the Audit Trail

You can control when the audit trail is in use in the following ways:

∑       Application Inclusion: The audit trail check box on the Admin Tools Selection dialog that you reach from the VPM Enterprise Options menu controls whether the audit trail is included in an application.

∑       Application On/Off: The audit trail check box on the Admin Tools dialog that you reach from an application's Security menu controls whether the audit trail is on or off in an application.

∑       Field Level: A field's audit trail field option properties on the field Edit Properties page in the VPM Enterprise Data Builder determines whether the audit trail is on or off for Adds, Changes and Deletes when the field is placed on a form.

∑       Form Level:

∑       Edits: A form's lNoChangeAuditTrail property determines whether the audit trail is on or off when a record is edited on a form. By default the audit trail is on. Set the lNoChangeAuditTrail property to .T. to turn the audit trail off when editing a form.

∑       Adds: A form's lNoNewAuditTrail property determines whether the audit trail is on or off when a record is added on a form. By default the audit trail is on. Set the lNoNewAuditTrail property to .T. to turn the audit trail off when adding a record on a form.

∑       Deletes: A form's lNoDeleteAuditTrail property determines whether the audit trail is on or off when a record is deleted on a form. By default the audit trail is on. Set the lNoDeleteAuditTrail property to .T. to turn the audit trail off when deleting a record on a form.

Audit Trail Report

The VPM Enterprise and application Report Managers contain an audit trail report. The audit trail report prints each userís records in the audit trail table. You can select the reportís order, filter and scope.

Audit Trail Table

The audit trial records are stored in the SDATAAudit.DBF table.

Audit Trail Management

If an application gets a lot of use, the number of records in the audit trail table can get large very quickly. Periodically, print the audit trail report, backup the audit trail table and delete its records. You can use the Group Delete Toolbar control on the Audit Trail form or the Zap function in the Data Manager.

More:

Reindex / Pack Tables Utility