If - End if

Declaration

</AMIF>

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.

Practical Usage

Used to terminate the If...Else block of steps.

Example

The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.

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

<AMIF EXPRESSION="2 &lt; 1">
<AMSHOWDIALOG>The result is TRUE.
</AMSHOWDIALOG>
<AMELSE />
<AMSHOWDIALOG>The result is FALSE.
</AMSHOWDIALOG>
</AMIF>