Select - End Select

Declaration

</AMSELECTCASE>

Description:

Ends a block of steps started by a preceding Begin select activity.

Practical Usage

Required whenever a font-weight: bold;">Begin select step is used in order to mark the end of a block of steps started by the preceding font-weight: bold;">Begin select activity.

Parameters

General

(No parameters)

Description

Error Causes

On Error

Example

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

Description: This example uses a Select/Case combination along with a Weekday() function to determine the day of the week (1=Sunday, 2=Moday, etc.). A message box that corresponds to the matching case will display the correct answer.

 

<AMSELECTCASE EXPRESSION="%Weekday(Now())%">

     <AMCASE CONSTANT="1">

          <AMSHOWDIALOG>Today is Sunday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="2">

          <AMSHOWDIALOG>Today is Monday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="3">

          <AMSHOWDIALOG>Today is Tuesday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="4">

          <AMSHOWDIALOG>Today is Wednesday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="5">

          <AMSHOWDIALOG>Today is Thursday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="6">

          <AMSHOWDIALOG>Today is Friday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="7">

          <AMSHOWDIALOG>Today is Saturday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="8">

          <AMSHOWDIALOG>Something went horribly wrong.</AMSHOWDIALOG>

     </AMCASE>

</AMSELECTCASE>

</AMIF>