Variable - Return
Declaration
<AMVARIABLE ACTIVITY="return" TYPE="value" VALUE="text" />
Description: Exits the current function and returns task execution to the calling function. A return value can also be specified to the caller.
Practical Usage
Immediately ends execution of the current function and returns its argument as the value of the function call.
General Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Value |
Text |
No |
(Empty) |
VALUE="return value" |
If enabled, specifies a text return value. Enabling this parameter automatically disables the Contents of variable/dataset/array and Nothing parameters. |
Contents of variable/dataset/array |
Text |
No |
(Empty) |
VARIABLE="varName" |
If enabled, denotes contents of the variable, dataset or array as the return value. Enabling this parameter disables the Value and Nothing parameters. This parameter is enabled by default. |
Nothing |
Yes/No |
No |
Yes |
Null |
If enabled, specifies no contents as the return value. Enabling this parameter disables the Value and Contents of variable/dataset/array parameters. This parameter is enabled by default. |
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description
Return the value "This is the value to return." from the function<AMRETURN TYPE="VALUE" VALUE="This is the value to return." />