Call Function

 

Declaration

<AMCALLFUNCTION FUNCTIONNAME="text" RESULTVARIABLE="text" />

See Also

Execute DLL Function | Registry | BASIC Script | Call Function | MSMQ (Microsoft Message Queuing) | Microsoft SharePoint | AS2 (Applicability Statement 2) | Amazon EC2 (Elastic Compute Cloud) | Amazon RDS (Relational Database Service) | Amazon S3 (Simple Storage Service) | Amazon SimpleDB | Amazon SQS (Simple Queue Service)

Description

Calls a function defined in the task. If the function returns a result, you can specify the name of the variable in which to place the value. For more details, see Task Function.

NOTE: Using % to delimit variables is optional, however, all string literals (strings to be taken as themselves) must be surrounded by double quotes (Example: "string literal").

Practical Usage

See Description.

General Properties

Property

Type

Required

Default

Markup

Description

Function name to call

Text

Yes

(Empty)

FUNCTIONNAME="functionName"

Name of the function to call. To create a task function, see Task Function.

Return result into variable

Text

No

(Empty)

RESULTVARIABLE="theVar"

The name of an existing variable in which to populate with the result of the function.

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Call function theFunctionName and place the result into variable "theVariableName"

<AMCALLFUNCTION FUNCTIONNAME="theFunctionName" RESULTVARIABLE="theVariableName" />