Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scripting_function


Panel
titleDescription

Inserts a record into an audit profile.

Client permissions restrictions


Panel
titleSyntax

system.util.audit([action], [actionTarget], [actionValue], [auditProfile], [ actor], [actorHost], [originatingSystem], [eventTimestamp], [originatingContext], [statusCode])

  • Parameters

String action - What happened. Default is null. [optional] 

String actionTarget -  What the action happened to. Default is null[optional] 

String actionValue -  The value of the action. Default is no value[optional] 

String auditProfile Where the audit record should be stored. Defaults to the project’s audit profile (if specified), or the Gateway audit profile if calling in the Gateway or Perspective Session scope. [optional] 

String actor - Who made the change. Will be populated automatically if omitted, assuming there is a known user. [optional] 

String actorHost The hostname of whoever made the change. Will be populated automatically if omitted. [optional] 

List[String], String | String] originatingSystem An even-length list providing additional context to the audit event. Will be appended to the automatically generated list. Typically, the automatically generated context looks like this:  sys:${gatewayName}:\project:${projectName}). So if you provided [“component”, “Joe’sButton”, “field”, “value”], you would get a record with originatingSystem:sys:${gatewayName}:\project:${projectName}:\component:Joe’sButton:\field:valueOr, if a string is provided, this automatic context will not be used and your provided string will be written directly into the originatingSystem column in the audit profile. [optional] 

Date eventTimestamp - When the event happened. Will be set to the current time if omitted. [optional] 

Integer originatingContext - What scope the event originated from: 1 means Gateway, 2 means Designer, 4 means Client. Will be set automatically if omitted. [optional] 

Integer statusCode - A quality code to attach to the object. Defaults to 0, indicating no special meaning. [optional] 

  • Scope

    Gateway, Vision Client, and Perspective Session.

Panel
titleCode Examples
Code Block
languagepy
# All of the parameters are optional, so you're free to only provide parameters you're interested in. 
# In the vary least provide just the action you wish to record, which gives the function a chance to look up all of the other parameters automatically.
system.util.audit("The user did a thing!")
Panel
Code Block
languagepy
# Simple example just showing parameter usage. 
myAction = "The button was pressed"
myTarget = "My Button"

system.util.audit(action = myAction , actionTarget = myTarget )
Panel
titleKeywords

system util audit, util.audit