Description

Updates the Audit table to track modifications of a record.

Syntax

Audit_Manager(ID, Table, CurrentRecord, OrigRecord, Activity)

Parameters

ParameterDescription
IDID of the record
TableTable name where the record being audited is stored
CurrentRecordCurrent record as it will be written to disk. If the Activity is "Write" then the audit fields will be updated.
OrigRecordIf called by Audit_Manager_MFS then this is the original record otherwise this represents a marker for special audit tracking
ActivityIdentifies the audit activity being performed: Read, Write, Delete, or anything else if called directly for special audit tracking

Remarks

This subroutine handles the core functionality for the Audit Manager. Normally this is called automatically by the Audit_Manager_MFS subroutine, which is used whenever a database table is tagged for auditing. However, developers can also use the Audit_Manager subroutine within their own procedures to assist them in debugging very complex code, especially if the contents of a data record is being updated at various points. Doing this will create an entry in the Audit table, just like the Audit Manager would normally do during database activities such as writing to disk. When used in this way the developer can use the OrigRecord and Activity parameters to pass in labels (or markers) that will be displayed in the audit trail log.

Example

ID = Get_Property(@Window, "ID")
Table = "CUSTOMERS"
CurrentRecord = Get_Property(@Window, "RECORD")
OrigRecord = "Line 8"         ; // Identify where in the program this is being tracked.
Activity = "Customer Balance" ; // Identify the reason this record is being tracked.
Audit_Manager(ID, Table, CurrentRecord, OrigRecord, Activity)

Screenshot

 

See Also

Audit_Manager_MFS

  • No labels