If - End if

Declaration

<AMIF ACTIVITY="end" />

Related Topics   

Description

Marks the end of the block of steps that should be executed if any preceding If activity returns TRUE. If a preceding If activity returns FALSE and an Else activity is encountered, marks the end of the block of Else related steps.  

NOTE: All If activities must be followed at some point with an End If step to mark the end of the code block that is to be executed if the expression is TRUE. For ease of use, by default, any If activity added to the Task Builder's Steps panel is always followed by an End If activity.

Practical usage

Used to terminates the If / Else block of steps.

Parameters

(This activity contains no parameters)

Description

Error Causes

On Error

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

Simple If / Else Statement that displays the answer in a message box and ending with an End if statement.

Copy
<AMIF EXPRESSION="2 &lt; 1" />
<AMSHOWDIALOG MESSAGE="The result is TRUE." />
<AMELSE />
<AMSHOWDIALOG MESSAGE="The result is False." />
<AMIF ACTIVITY="end" />