Deleted Records Change-tracker 

Users can delete records in an Orixa App, provided that the record is not linked to any child-records.
Orixa Apps do not provide a full "undo" audit-trail for all records by default.  This can be added as a special feature, but it is generally discouraged because it uses a lot of resources.

Sometimes users may want details of particular records that have been deleted. As Orixa Apps keep an Edit History Log of all users' actions in creating, editing and deleting records a basic audit-trail can be created.

Details of how to do this are shown below

Find the "Deleted Records Change Tracker" in the Resources Tree-view

T

Resources Tree-view Deleted Records Change-tracker  

In the "Resouces Tree-view":

  1. Open the Entity > EditHistory > Grid > Deleted Records Change-tracker resource. Then click "Activate" from the main tool-bar.

Change-tracker: Enter details  

In the "Activate" screen

  1. Enter a date-range
  2. Type in the name of the table who's  deleted records you want to explore.
  3. Click "Run Search"

 

The database will be queried to find all the deleted records of the table-name you enter, in the period selected.

It will then find all the change-records stored in the EditHistory log for these deleted records.

Change-tracker Grid  

Deleted Records Grid

Data is returned about the deleted records.

The App cannot provide content of the deleted data. However, it can provide some useful information

  1. The ID of all deleted records is returned. This is useful to identify the record through its possible presence in a backup file.
  2. On each day that the record existed and was edited a group is shown.
  3. For every time of day that a user edited the data a row is shown.
  4. The name of the person who edited the data is shown for every row. For problematic data it is often useful to know the date, time and person who edited a record, as they can help in understanding what it contained.
  5. The ChangeType for each row is shown: "Ins", "Edt" and "Del" for Insert, Edit and Delete.

I need to know more about a deleted record, what can I do?

For most Orixa Apps regular daily backups are made of the whole database. This means if a record was created on date A and deleted on date B then a backup should exist which was made when the record existed. 

If this is the case, the database can be restored from this backup file and reviewed, but it will only show data about this record at the time of the backup.

However, if a record was created and deleted on the same date (without a backup being made in between) then there will not be any saved version of the data which includes this record.

Most Orixa Apps do not keep backups forever. Older backup files are often deleted or removed. In these cases it may also be impossible to get detailed data about a deleted record.

If it is essential that full "change-tracking" occurs for some of your data, so that all changes and deletions occur whilst keeping an audit trail that users can "undo" discuss this with your developer and these features can be added to your Orixa App, but note that this will result in slower performance and extra costs in terms of data use.

My Orixa App doesn't include a "Deleted Records Change-tracker" what can I do?

If your developer runs the following script, it will add the resource to your Orixa App.

Example Script

INSERT INTO Resources
("Name", LocationID, ComponentID,
SQLStr, LinkTable, TargetTable )
VALUES
('Deleted Records Change-tracker', TypeID('Entity'), TypeID('Grid'),
'SELECT
ID, LinkID,
S.Name as "Status",
LinkTable,
CAST(DateCreated as Date) as DateDone,
CAST(DateCreated as Time) as TimeDone,
ChangeType,
P.FullName as Author
FROM EditHistory EH
LEFT JOIN "Status" S ON S.ID = EH.StatusID
LEFT JOIN People P ON P.ID = EH.AuthorID

WHERE LinkID IN (SELECT LinkID FROM EditHistory
WHERE ChangeType = ''Del''
AND LinkTable = ''[STR LinkTable]''
AND DateCreated BETWEEN CAST([MinDate] as DATE)
AND CAST([MaxDate] as DATE)
)
ORDER BY LinkID, DateDone, TimeDone',
'EditHistory', 'EditHistory' )