System Tables: EditHistory

The EditHistory data-table is a framework-table that is built into the Orixa system.
Whenever a user inserts, updates or deletes any data-record in an Orixa App a record of this action is stored in the EditHistory App.

The EditHistory table is useful as a simple audit-log of all work done by every user in your App. It has many uses, including showing when users edited or added data and confirming whether users have done work.

Accessing EditHistory data

EditHistory for a record  

  1. In every Edit Form in your App the "EditHistory" icon is present in the toolbar.
  2. When the EditHistory icon is clicked "Audit Trail Data" for that particular record is displayed.

Each edit and update for every record is stored, the data stored in kept to a minimum to avoid using to much computer resource.

EditHistory Edit Formd  

Clicking on the links in the Audit Trail window (shown above) will open an Edit Form for that particular EditHistory record.

This record cannot be deleted or edited, as it shows Audit data.

  • If the selected record had a "StatusID" then the Status at the time of the Edit will be stored. Note this is not a "StatusID" as used in other systems. It is a record of the StatusID of the edited record.
  • The exact time of the Edit is also stored.
  • The nature of the change is also stored. This can have values: Ins, Edt, Del and Prog. These stand for Insert, Edit, Delete and "Programatic Action". "Prog" is used where a data-record is acted on by a Stored Procedure.
  • The EditHistory Edit Form also shows the Author who made the change and a link to the changed record.

Other places where EditHistory data is surfaced in an Orixa App

The EditHistory table is just an ordinary data-table in the database, except that it is protected to avoid data being edited or changed, so that it always shows a reliable audit trail.

This means it can be incorporated into resources, reports, dashboards and other outputs in your App. Standard Orixa Apps include a "User Activity Dashboard" which shows the numbers of data-edits and data-entry done by all users in a system. This dashboard uses the EditHistory data-table as its source for data.

There is also a useful Function built into the framework: "OriginalAuthor" which uses the EditHistory data-table to return the first user linked to a record in the EditHistory data-table. 

Accessing a ful-listing of EditHistory Records

System Menu EditHistory  

It is sometimes useful to access a general list of EditHistory records. This allows a general auditing of your system.

As EditHistory records are created "in order" as users edit and add data, the EditHistory table provides a really useful and accurate trail of users' activities.

To access this:

  1. From the System Menu
  2. Select "View / Edit System EditHistory"

 

System Menu Date-Search  

The EditHistory table can be extremely large, so by default when opened you are prompted to enter a date-range to limit the number of records that are returned.

  1. A Grid-view opens, linked to the EditHistory framework-table.
  2. User enters a date range, and a grid of records will be displayed which can be searched/filtered and viewed.

The structure of the EditHistory framework-table

CREATE TABLE "EditHistory"
( "ID" INTEGER DEFAULT UID() NOT NULL,
  "LinkID" INTEGER,
  "StatusID" INTEGER,
  "LinkTable" VARCHAR(50) COLLATE "ANSI",
  "DateCreated" TIMESTAMP DEFAULT Current_Timestamp,
  "ChangeType" VARCHAR(50) COLLATE "ANSI",
  "AuthorID" INTEGER,
 CONSTRAINT "PK_EditHistory" PRIMARY KEY ("ID") )