Skip to main content
Version: 1.25

Log Event

Audience: Citizen Developer

Skill Prerequisites: System Administration

This action logs an event of the type selected to the site's Admin Logs. You can specify a UserID and custom properties to include in the log message. The message generated by this action can be viewed in Plant an App configuration under Logs > Event.

Typical Use Cases

  • Log an alert message when a specific event triggers this action.

Don't use it to

Action NameDescription
Log ErrorWrites a message to Admin Logs of type General Exception

Input Parameter Reference

ParameterDescriptionSupports TokensDefaultRequired
Event TypeSelect the type of event from the available options. If nothing is selected, defaults to Admin Alert. Using EXPR button, this value can be tokenized to return any of the available options based on the value passed in.YesAdmin AlertNo
User IDOptionally pass in a user ID to log with the event. If value is not set, UserID is logged as -1.YesEmpty StringNo
Log PropertiesClick the add button to pass in Name and Value pairs that will be logged in the event details. Both Name and Value can be tokens.YesNoneNo

Examples

1. Log an Admin Alert when a user is denied access to a form

Import this action into the On PreInit or On Init sections of a form and edit the condition to check if the logged in user has permission to use the form. Follow this action with an error message displayed to the user.

{
"Title": "Log Event",
"ActionType": "LogEvent",
"Description": "User denied access to form",
"Condition": "![HasRole:SpecifyRole]",
"Parameters": {
"EventType": {
"Expression": "",
"Value": "ADMIN_ALERT",
"IsExpression": false,
"Parameters": {}
},
"UserID": "[User:UserID]",
"LogProperties": [
{
"value": "[User:Email]",
"name": "Email"
},
{
"value": "[Module:ModuleID]",
"name": "Form"
},
{
"value": "[Url:Relative]",
"name": "Location"
},
{
"value": "User Denied Access",
"name": "Result"
}
]
}
}