Introduction to Extended Functions

Overview

AutoMate provides a library of additional functions that extend the functionality and performance of the AutoMate Scripting Engine beyond the capabilities that the basic VBA-compatible engine offers. These functions, collectively referred to as Extended Functions, perform advanced operations and generate numerous values related to all areas of an AutoMate eco-system in order to provide additional functionality and make formulating AutoMate tasks even easier. Such functions deliver a more straightforward approach to file related operations, date/time manipulation, and viewing or modifying attributes of a running task. The extended functions can be used from within the properties of any AutoMate action/activity just like the normal VBA-compatible functions.

AutoMate extended functions can be extremely useful because they supply added functionality to a given task. The extended functions are capable of returning multiple attributes in regards to a running task, such as the task name, the agent that ran the task, the start time, end time and total execution time of the task and the task's completion state (i.e. completed successfully, failed, aborted). When a task fails, the use of extended functions can return the precise step that failed, the unique error number as well as a textual description of the error that occurred. The extended functions can perform extensive date/time and file related procedures as well, such as returning the first or last day of the specified month, quarter or year, returning the number of files found in the specified folder or extracting the file name or the path within a particular string.

Accessing Extended Functions

A full library of pre-defined AutoMate extended functions can be found in Expression Builder via the Extended Functions folder (shown below). Selecting this folder populates all available extended functions in the bottom-right panel. To access Help regarding each extended function can be accessed by first selecting the Extended Functions folder to populate available extended functions in the right , then selecting the desired extended function from the lower right pane and pressing the F1 key or by right-clicking the extended function and selecting Help from the popup menu that appears.

Format

The general format of a function is its name followed by any arguments, usually contained in between parenthesis. For example:

FunctionName(arguments)

Similar to the regular VBA-compatible functions, some Automate extended functions may or may not require arguments in order to properly complete an operation. However, a function without arguments must still include an empty set of parentheses, such as:

FunctionName().

For more on the use of functions, see Using Functions.