Audit Log Entries On Form


The Requirement

It’s a fact, humans error. And when things don’t look right, you need to know who did what to find out if it is an error or if it is a genuine entry.

We have several occasions when we have wanted to audit changes made on fields, but we need users to be able to see what has happened rather than asking IT, and the audit log itself is not the easiest thing to traverse for the average user.

As a result I have opted to add secondary collections to the forms requiring this and filter the ido accordingly, then put a sub collection grid on a new notebook tab as shown here :-

rma-auditlog-sub

To do this it is quite straight forward, drop into design mode, then within the form properties, select the collection tab and click new as shown here :-

addingsubcollection

The IDO is “AuditLogs” and the permanent filter expression in our case is “MessageType in (‘10934′,’10930’) AND KeyValue = FP(RmaNum) + ‘-‘ + cast(FP(RmaLine) as nvarchar(5))”

You need to set the IDO to refresh initially – I normally do this on the standard form initialisation complete event, but in this instance I had to use the filter complete.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.