Select - End case
Declaration
<AMCASE ACTIVITY="endcase" />
Description
Ends a block of steps started by a preceding Select - Begin case activity.
Practical usage
Required whenever a Select - Begin case step is used to mark the end of a block of steps started by the preceding Select - Begin case activity.
Parameters
General
(No parameters)
Example
- 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
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 MESSAGE="Today is Sunday" />
<AMCASE ACTIVITY="endcase" />
<AMCASE CONSTANT="2" />
<AMSHOWDIALOG MESSAGE="Today is Monday" />
<AMCASE ACTIVITY="endcase" />
<AMCASE CONSTANT="3" />
<AMSHOWDIALOG MESSAGE="Today is Tuesday" />
<AMCASE ACTIVITY="endcase" />
<AMCASE CONSTANT="4" />
<AMSHOWDIALOG MESSAGE="Today is Wednesday" />
<AMCASE ACTIVITY="endcase" />
<AMCASE CONSTANT="5" />
<AMSHOWDIALOG MESSAGE="Today is Thursday" />
<AMCASE ACTIVITY="endcase" />
<AMCASE CONSTANT="6" />
<AMSHOWDIALOG MESSAGE="Today is Friday" />
<AMCASE ACTIVITY="endcase" />
<AMCASE CONSTANT="7" />
<AMSHOWDIALOG MESSAGE="Today is Saturday" />
<AMCASE ACTIVITY="endcase" />
<AMCASE CONSTANT="8" />
<AMSHOWDIALOG MESSAGE="Something went horribly wrong" />
<AMCASE ACTIVITY="endcase" />
<AMSELECTCASE ACTIVITY="end" />