|Contents:||Main||Chapter||See Also:||Getting Started Manual||Advanced User Manual|
This procedure returns a list of IENs of entries that have had audit events within a specified time period. Optionally, the oldest value of each audited field within that time period is returned with each entry.
|FILE||(Required) File number of a file which is being audited.|
|FIELDS||(Required) Specifies which fields from the audited
file are to be examined for audit history. Can be one of the following:
|FLAG||(Optional) "O" if the "oldest" values within the specified time period are to be returned. Without the "O" parameter, the API returns only the entry numbers.|
|TARGET_ROOT||(Required) The name of a closed root reference.|
|START_DATE||(Optional) Beginning date/time (FileMan format) of the auditing period. If no START_DATE is specified, the file's audit history will be scanned from its earliest date/time.|
|END_DATE||(Optional) Ending date/time (FileMan format) of the auditing period. If no END_DATE specified, the file's audit history will be scanned through its most recent date/time.|
|TARGET_ROOT||The output array is found in TARGET_ROOT(IEN)=""
oldest values, if requested by the "O" parameter, are in TARGET_ROOT(IEN,field#)
Also, if the PURGE DATA AUDITS option is run, information
from the audit trail is removed.
Find which entries in File #999000 have been changed since yesterday.
>S %DT="",X="T-1" D ^%DT,CHANGED^DIAUTL(999000,"*","","^TMP($J)",Y) ^TMP($J,7)="" ^TMP($J,4878)="" ^TMP($J,9899)=""
Three records have had audited events since yesterday at 12:01 AM.
>D CHANGED^DIAUTL(999000,.01,"O","ARRAY") ZW ARRAY ARRAY(344)="" ARRAY(344,.01)="DELETED,DAVID" ARRAY(477)="" ARRAY(477,.01)="UNMARRIED,UNA"Two records are found, because the audit status of the .01 field of this file is "EDITED OR DELETED". Entry 344 no longer exists. Entry 477 has a new married name. It is the EXTERNAL version of the old value that is returned. If the name were changed twice in the time period, the oldest value would be returned.
Reviewed/Updated: March 10, 2007