Skip to main content

Audit: Identify changes made to an address history record using the audit export function

Data export audit to see when/who changed an address.

H
Written by Harry Ledger
Updated over 3 months ago

To create a data export to identify changes made to address records, follow the steps below.

  1. Log in to the Admin Tool.

  2. In the Maintenance section, click Import/Export Data.

  3. Click Create an export definition, then Select the data to export.

  4. Use the database drop-down and select SelectHR.

  5. Log in with the SQL credentials.

  6. On the SQL tab, copy and paste the following SQL:

    • Select Person.Snapshot.[Person Number], Person.Snapshot.[First Name], Person.Snapshot.Surname, Person.Address.[Address Number], Person.Address.[Address Line 1], Person.Address.[Address Line 2], Person.Address.[Address Line 3], Person.Address.[Address Line 4], Person.Address.[Address Line 5], Person.Address.[Post Code] From Person.Snapshot Inner Join Person.Address On Person.Snapshot.[Person Number] = Person.Address.[Person Number] Where Person.Snapshot.Surname = 'ENTER SURNAME HERE'
  7. In the bottom half of the window, type the Surname of the employee who had the Address record changed into the Criteria column of the Person.Snapshot.Surname field.

  8. Click the Data tab, and make a note of the Address Number of the changed Address record.

  9. To exit the Export, click Cancel.

  10. Click Select the data to export.

  11. Use the Database drop-down and select SelectPersist.

  12. Log in with the SQL credentials.

  13. On the SQL tab, copy and paste the following SQL:

    • SELECT AUDIT.[Object Schema], AUDIT.[Object Name], AUDIT.[Key Number], AUDIT.[Audit Date], AUDIT.Action, [Audit Fields].[Field Name], [Audit Fields].[Is Text], [Audit Fields].[Was Text], Security.Users.[User Name] FROM AUDIT INNER JOIN [Audit Fields] ON AUDIT.[Audit Number] = [Audit Fields].[Audit Number] INNER JOIN Security.Users ON AUDIT.[User Number] = Security.Users.[User Number] WHERE AUDIT.[Object Schema] = 'Person' AND AUDIT.[Object Name] = 'address' AND AUDIT.[Key Number] = 'ENTER ADDRESS NUMBER HERE'
  14. Click the Query tab, and enter the Address Number noted in Step 7 into the criteria section of the field named AUDIT.[Key Number].

  15. Click the Data tab. The Data tab will now display a list of all changes made to the specific Address History record. The data is usually sorted by Audit Date (the date in which the change was made), with the oldest change appearing at the top of the list.

It is possible to see all changes made, who made them, and when using this data, which can be exported if necessary.

Did this answer your question?