Introduction to Extended Functions
A library of additional functions extends the functionality and performance of the 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 to provide additional functionality and make formulating 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 action/activity just like the normal VBA-compatible functions.
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 (e.g., 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 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 extended functions may or may not require arguments 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.