Skip to main content

Audit: Identify changes made to an Absence History record using an Audit Export in the Admin Tool

Audit export to identify changes made to an absence record.

H
Written by Harry Ledger
Updated over 2 months ago

If you need to see who authorised an absence request and when, you will be able to find this information in the workflow log.
​
Alternatively, you can create the audit export to track changes to absence records, who made the change and when.
​
Before you can create the export, you need to identify the absence number for the record. To do this, follow the steps below.

β€‹πŸ“Œ Note: If anyone has deleted the absence record, the steps below won't work. In this instance, skip to the audit deleted absences section of this article.

  1. In the Admin Tool, click Import/export data.

  2. Click Create an export definition.

  3. Click Select the data to export.

  4. From the Database drop-down menu, select Select HR.

  5. Click the SQL tab then delete Select*.

  6. Copy the following SQL data into the blank space:

    Select Person.Snapshot.[Person Number], Person.Snapshot.[First Name], Person.Snapshot.Surname, Absence.History.[Absence Number], Absence.History.[Absence Start Date], Absence.History.[Absence End Date], Absence.History.[Absence Type], Absence.History.Workflow, Absence.History.[Created Date] From Person.Snapshot  Inner Join Absence.History On Person.Snapshot.[Person Number] = Absence.History.[Person Number]
  7. Under Person.Snapshot.Surname, in the Criteria column, enter the employee's surname whose absence record changed.

  8. Click the Data tab then note the absence number.

  9. Click Cancel.


Audit the record

  1. In the Admin Tool, click Import/export data.

  2. Click Create an export definition.

  3. Click Select the data to export.

  4. From the Database drop-down menu, select SelectPersist.

  5. Click the SQL tab then delete Select*.

  6. Copy the following SQL data into the blank space:

    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] Inner Join security.users On audit.[User Number] = security.users.[user number] Where audit.[Object Schema] = 'absence' And audit.[Object Name] Like '%history%'
  7. In the AUDIT.[Key Number] field, enter the absence number you noted.

  8. Click the Data tab.

From here, you can see all changes for the absence record.


Find the original absence entry

The steps below relate to the export you created in the previous section.

  1. Note the user name and audit date for the first appearance of the record.

  2. Open the Workflow Log then, under Display Entries Between, enter the audit date you noted.

  3. Check the Initiator column for the user name you noted.

  4. Check the date column to confirm this matches the audit's time.


Audit deleted absences

To find a deleted absence record, follow the steps below.

  1. From the Admin Tool, click Import/export data.

  2. Click Create an export definition.

  3. Click Select the data to export.

  4. From the Database drop-down menu, select SelectPersist.

  5. Click the SQL tab then delete Select*.

  6. Copy the following SQL data into the blank space:

    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] Inner Join security.users On audit.[User Number] = security.users.[user number] Where audit.[Object Schema] = 'absence' And audit.[Object Name] Like '%history%' AND [audit fields].[Field Name] = 'Person Number' AND [audit fields].[Was Number] = 'Replace with Person Number'
  7. Click the Data tab then note the keys.

  8. Click the Query tab then remove any criteria relating to Field Name and Was Number.

  9. Under Key Number Criteria, enter the keys you noted in step 5. Note: If you have numerous keys, you can enter them in the criteria using the In() clause with comma separations.

  10. Click the Data tab.

From here, you can see all changes to the deleted absence record.

Did this answer your question?