Skip to content

Audit log

The audit log shows on a screen who did what:

  • tag and setpoint writes;
  • alarm acknowledgement and shelving;
  • logins and logouts;
  • recipe and project loads;
  • shift log entries.

The server keeps the log, and entries are linked by a hash chain, so an edit that bypasses the server is visible. The check is in the editor’s Users section.

Settings:

  • Show, days sets how many recent days are shown.
  • User shows one user’s actions only.
  • Filter keeps only entries whose action, object or details contain the text (Pump1, Tag write).

The table refreshes periodically.

A user with the “Audit” right sees the whole log. Everyone else sees only their own actions in this view, so an operator can check what they wrote and when without seeing other people’s actions. “Only own actions” shows a user’s own actions even to someone who can see the whole log.

Besides the properties of every element — name, position, size, tooltip, rotation, transparency and the operate right:

Property Values Default Description
Days integer 1 Show, days. Entries for this many recent days
OnlyMine true / false false Only own actions. Show the logged-in user’s actions even if the whole log is visible to them
User text User. Only this user’s actions; empty — everyone’s
Filter text Filter. Only entries whose action, object or details contain this text: “Tag write”, “Pump1”
RefreshSec integer 10 Refresh, s
FontSize number 12 Font size

Item.Type = AuditView. Any property is read and changed by name: Item.FontSize = 10. The common element members (Visible, Enabled, Value, Raise, Apply…) are described in Elements from scripts.

Actions of this element:

Member Description
Entries() Entries on screen — Time, User, Action, Target, Details
OwnOnly Only own actions are shown
Refresh() Reload entries from the server

Mouse, hover, focus and keyboard — as for any element (see Events and functions).

The last setpoint write: show who changed it and when.

var last = Screen.Items("Actions").Entries().filter(function (e) {
return e.Target == "Boiler.Setpoint";
})[0];
if (last) HMI.ShowMessage(last.User + " changed the setpoint " + last.Time.toLocaleString() + ": " + last.Details);

Refresh the log right after an important command.

Screen.Items("Actions").Refresh();