Record Recall


Have you ever changed a record and wished later that you could change it back to how it was before saving it? Have you ever performed a global replace only to find the changes were not exactly what you had in mind? Wouldn't it be nice if EMu provided a facility that allowed you to recall the data for a single record or group of records to an earlier version? Well, the new Record Recall facility introduced in KE EMu 4.0.01 provides this functionality.

KE EMu 3.2.04 saw the introduction of a new auditing facility. The facility maintains a complete list of changes made to records within an EMu installation. The new Audit Trails module allows users to view these changes along with the associated metadata. This metadata includes:

One use of the audit information is to provide statistical analysis about changes to data within an EMu environment. It is possible to use this data to produce reports about the number of records inserted, modified and deleted on a system wide or per user basis.

A list of all modifications made each time a record is saved is produced as a record is changed over time. The Record Recall facility provides an automated way of applying changes to a record so that it looks like an earlier version. In essence it allows the modifications made to be "undone" so that the record appears as it did at an earlier time, although it is important to understand that the record is not reset to the earlier version: rather the record is modified so that it has the same data as the earlier version. The distinction here is that the "recalled" record is just another change to the current record, not a winding back to a previous version. As such, all existing audit trail records are maintained and a new one is created for the "recalled" record.

The Record Recall facility allows a single record to be recalled to the data it contained in a previous version and also provides a batch mode for a group of (one or more) records to be recalled to their state at a given date and time.

Recall Single Record

The Record Recall facility is invoked from the Edit>Recall menu. It may be selected while viewing or editing a record. If you want to recall the data for a single record, the Current Record sub-menu is used:

Recall Record Menu

(All dates are shown in dd/mm/yyyy format. EMu will use the date format defined on your server when displaying dates)

The Current Record sub-menu lists the date and time of the last five modifications of the current record, as well as the user who made the changes. If you select one of these entries, the current view is changed to Detail mode and the data is updated to reflect the values in the record as at the date and time selected. The record is left in Edit mode and you may save it to affect the recall, or cancel the changes.

If there are more than five modifications, you can use the All... menu entry to view a list of all the dates and times:

Recall All List

You may select any entry from the list and click OK to recall that version of the data. Once again the record will be updated to contain the data as it was at the date and time selected. You will be left in Edit mode, allowing you to save or discard the changes. The View button invokes the Audit Trail module with the update audit records for the current record displayed. Note that only the audit records related to data changes will be shown; other audit records (e.g. insertion, searching) are not shown.

Once a date and time is selected all modifications to the current record from the most recent to the entry selected are "undone". For example, if you selected 13/03/2008 15:00 (emu) from the list above, the data changed by the following records would be reversed in the order listed:

Once again you will be left in Edit mode so you may save or discard the changes.

While you are in Edit mode, recalling a previous version of the record will only update fields that have data to be recalled within the specified period; all other fields are not affected. For example, if you have just added data to fields for the first time, that data will not be removed by recalling an earlier version of the record.

It is possible to recall the data for a record even if you did not make the changes to the record. However, EMu will enforce both field and Record Level Security when applying a recall. If you do not have edit privileges for the current record, either through Record Level Security or a lack of the daEdit privilege, you cannot select the Recall menu option.

If the data recall would result in a field being changed that you do not have permission to update (missing duEdit privilege), a message similar to the following will display:

Recall Column Error

The recall will continue to update fields once OK is clicked. In this case the record will not contain an exact copy of the data as it was at the date and time selected. EMu will leave you in Edit mode and you may save or discard the recalled data.

Recall batch mode

It is also possible to recall a group of (one or more) records as a single batch. In this case the records are updated and saved without the need to recall each record individually. The Edit>Recall>Selected Records menu option is available when one or more records are selected and you have the daReplace privilege (that is, you are allowed to use the Replace command).

When the menu option is invoked you will be prompted for the date and time to which the selected records will be recalled:

Recall Batch Dialogue Box

Once you have supplied a date and time and clicked OK, EMu will begin recalling each record selected and applying an update to reflect the values in the record at the date and time specified. As with recalling a single record, you must have permission to modify the fields that are recalled. If not, the process will stop and a similar message to that for a single recall is displayed:

Recall Batch Error Dialogue Box

You must also have permission to update the record itself (via Record Level Security). If you do not have permission to modify a record, an error is displayed:

Recall Update Error

You can decide to cancel or continue the recall. Once the operation is complete a summary dialogue is displayed:

Recall Complete

After the batch recall has finished, the selected records will be updated with the recalled values.

Registry Entry

The Recall Record facility uses a Registry entry to determine which fields should not be updated when applying a recall. The format of the entry is similar to that for the Ditto entry:

        System|Setting|Table|table|Recall Skip Columns|column;column;...
table is the name of the module in which the columns are to be skipped; and
column;column;... is a semi-colon separated list of column names. 

EMu does not recall the Date Modified, Time Modified and Modified By fields when updating a record (as these fields contain the data concerning the person performing the recall operation).