VA FileMan V. 22.0 Programmer Manual Banner


 

Main Chapter Getting Started Manual Advanced User Manual

Auditing API


LAST^DIAUTL( ): Who last changed data

This extrinsic function uses the audit trail to retrieve the last user who touched a particular field value, and the date/time when this editing occurred.

Format
$$LAST^DIAUTL(FILE,ENTRY,FIELD)
Input Parameters
FILE (Required) File number of a file which is being audited. 
ENTRY (Required) Entry number in the audited file.
FIELD (Required) Specifies which fields in the audited file are to be examined for audit history.  Can be one of the following: 
  • A single field number.

  • A list of field numbers, separated by semicolons.

  • A range of field numbers, in the form M:N, where M and N are the end points of the inclusive range. All field numbers within this range are retrieved.

  • * for all fields.
Output
Returns a string, delimited by an up-arrow.  The string is null if there is no audit history on file for the given fields in the given entry.  If there is a history, the first up-arrow piece of the returned string is the (FileMan-format) date/time of the most recent audited event, and the second up-arrow piece is the user number (DUZ) of the user who made that most recent change.
Example

Find who last changed demographics of entry number 666 in File #2.

    >W $$LAST^DIAUTL(2,666,"0:1")
     3000708.103432^78

User number 78 was the user who most recently changed any of the audited fields numbered between 0 and 1 in this Entry.  This user did so on 8 July, 2000 at 10:34 AM.

 


Reviewed/Updated: March 10, 2007