Skip to main content

Audit: Identify changes made to a pay history record

Find out who has made a change to a pay history record.

H
Written by Harry Ledger
Updated over 2 weeks ago

You can use this audit process to find out who created, updated, or deleted a pay history record, and exactly what was changed.


The steps below show you how to locate the relevant pay record, identify its pay number, and then use the audit tables to view all recorded changes.

  1. Log in to the Admin Tool.

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

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

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

  5. Log in with your SQL credentials.

  6. In the SQL tab, copy and paste the following SQL:
    ​

    Select Person.Snapshot.[Person Number], Person.Snapshot.[First Name], Person.Snapshot.Surname, Employee.[Pay History].[Pay Number], Employee.[Pay History].[Pay From Date], Employee.[Pay History].[Pay Amount], Employee.[Pay History].[FT Pay Amount], Employee.[Pay History].[Pay Frequency], Employee.[Pay History].[Pay Element Type] From Person.Snapshot Inner Join Employee.[Pay History] On Person.Snapshot.[Appointment Number] = Employee.[Pay History].[Appointment Number]

  7. In the bottom half of the window, type the Surname of the employee who had the pay record changed into the Criteria column of the Person.Snapshot.Surname field.

  8. Click Data, and make a note of the pay number of the changed 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 your SQL credentials.

  13. In 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], [Audit Fields].[Is Date], [Audit Fields].[Was Date], [Audit Fields].[Is Number], [Audit Fields].[Was Number], [Audit Fields].[Is Decimal], [Audit Fields].[Was Decimal], [Audit Fields].[Is Boolean], [Audit Fields].[Was Boolean], Security.Users.[User Name] From AUDIT Inner Join [Audit Fields] On AUDIT.[Audit Number] = [Audit Fields].[Audit Number] Left Join Security.Users On AUDIT.[User Number] = Security.Users.[User Number] Where AUDIT.[Object Schema] = 'employee' And AUDIT.[Object Name] = 'pay history' And AUDIT.[Key Number] In (12345)

  14. Click the Query tab, and enter the pay number noted in step 8, into the criteria section of the field named AUDIT.[Key Number]. You can replace the (12345) value with the key number you made a note of.

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

Did this answer your question?