When a task is triggered, it automatically creates a dataset called AMTrigger. This dataset can be used within the task to determine specific system states or examine particular characteristics about the object that initially triggered the task. This includes information such as the name of the object that triggered the task, the date and time when the trigger occurred, which machine the trigger occurred and whether that machine was currently in a locked or logged off state when the task executed.

AMTrigger is a standard AutoMate dataset and can be used much like the datasets created by the SQL Query and Get EMail action. The fields of AMTrigger can be used to examine properties of the specific trigger that caused the task to launch. For example, using a Message Box activity with the Message to display parameter set to:


would display a message dialog during task execution that displayed the name of the trigger that launched the task.

Standard Parameters

Each trigger contains its own set of unique AMTrigger values. Therefore, the total number of fields that AMTrigger creates during runtime and what they are named depends largely on the trigger that launched the task. However, every instance of AMTrigger is populated with a list of common AMTrigger fields. They are listed in the table below:


Data Type

Return Value



Returns the name of the event or condition that triggered the task. Each event or condition contains a unique name. For example, if the File Trigger was used, the return value would be AMFILETRIGGER.



Returns the name of the managed task that the trigger was attached to. Useful to determine the responsible task when two managed tasks point to the same AML file.



Returns the date and time when the triggered event occurred.



Returns the machine name where the triggered event occurred.



If the workstation was locked when the trigger occurred, the value returned is 1. Otherwise, it will be 0.



If the workstation was logged off when the trigger occurred, the value returned is 1. Otherwise, it will be 0.



Returns a verbose set of information about the triggered event or condition in AML (AutoMate Markup Language) format.


NOTE: A full list of AMTrigger objects exclusive to each trigger can be viewed from the Expression Builder by expanding Objects -> Triggers and selecting the folder associated to the desired trigger.

See Also

About Triggers | All Available Triggers | Introduction to AML | Local Variables | Arrays | AMError