Querying the Audit Log

Managers of a Specify database can enable auditing in their database to audit user behaviors.

Get Started

To start auditing has to be enabled. To see if auditing is enabled start by heading to app resources

After that, select Remote Preferences under Global Resources

From there add the line auditing.do_audits=true if it’s not already present

Using the Audit Log

Field Definitions

Field Definition
ID The unique identifier for this audit log entry.
Action The type of operation performed (for example: Insert, Update, Remove).
Parent Record ID The ID of the parent record, usually the “scope” for the modified record (e.g. Collection, Discipline, Division).
Parent Table Number The name of the table the affected record belongs to.
Record ID The ID of the record that was affected by the action.
Record Version The record’s revision number at the time of the audit (0 means it was never edited).
Table Num The name of the table the affected record belongs to.
Timestamp Modified The date and time when this action was taken.
Version How many times this audit entry itself has been edited.
Created By Agent The identifier of the person (agent) who caused the action, which can be looked up to show a name.
Fields Indicates there are one-or-more field-level change records attached to this audit entry.
Field Name The name of the individual field that was changed.
Old Value The value the field had before the change.
New Value The value the field has after the change.

Viewing the audit log for one record

To start go to the chosen record through simple search, query, record set, etc.

After that select the Form Meta (the gear in the top right)

In that dialog press the Edit History button

That pulls up the audit log. This is an embedded query so it will have mappings already selected and will auto run upon pressing the Edit History button.

To see all the fields either Reveal Hidden Form Fields must be checked or they must be unhidden from the Sp Audit Log table in the schema

The given query should look something like this:

And here’s an example of what the results might look like

Even with all fields removed because this is an embedded query the Record ID, Table Num, Field Name, Old Value, and New Value fields will all stay but everything else can be customized

Querying the audit log

To query using the query builder go to Queries in the navigation bar and scroll down to Sp Audit Log

After pressing that there will be a blank adit log query like this

Once again, to see all the fields either Reveal Hidden Form Fields must be checked in the bottom left corner of the query or they must be unhidden from the Sp Audit Log table in the schema

From there just create your query. This works just like any other table you can query on and the different fields are defined below

An example query:

1 Like