Text - Convert Case

Declaration

<AMTEXT ACTIVITY="convert_case" TEXT="text" RESULTVARIABLE="text" 
CASE="text (options)" />

Description: Converts the specified text to upper case or lower case letters and populates a variable with results.

Practical Usage

Commonly used to change the case of selected portions of text. You can use it to change text to be all lower case, all upper case or apply title case.

General Parameters

Property

Type

Required

Default

Markup

Description

           

Text to Convert

Text

Yes

(Empty)

TEXT="convert to upper case"

The target text to convert. As with every text parameter, if the data you wish to convert is contained in a variable, simply enter the variable name surrounded by percentage signs to resolve it to it's contents at runtime (e.g., %variableName%).

Convert

Text (options)

No

Upper Case

CASE="upper_case"

The case to convert the text to. The available options are:

  • To upper case (default) - The target text will be converted to "UPPER CASE".

  • To proper upper case (first characters only) - The target text will be converted to "Proper Upper Case".

  • To lower case - The target text will be converted to "lower case".

Populate variable with result

Text

Yes

(Empty)

RESULTVARIABLE="varname"

The name of an existing variable in which to populate the newly converted text.

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: This task demonstrates ability to convert text to upper case, lower case and proper sentence case.

<AMVARIABLE NAME="theVar" />
<AMSHOWDIALOG ACTIVITY="input" DEFAULTVALUE="enter a string of text here." 
RESULTVARIABLE="theVar" WINDOWTITLE="Text to convert">This task demonstrates 
ability to convert text to upper case, lower case and proper sentence case.
</AMSHOWDIALOG>
<AMTEXT ACTIVITY="convert_case" TEXT="%theVar%" 
RESULTVARIABLE="theVar" />
<AMSHOWDIALOG WINDOWTITLE="The text converted to upper case.">
%theVar%</AMSHOWDIALOG>
<AMTEXT ACTIVITY="convert_case" TEXT="%theVar%" 
RESULTVARIABLE="theVar" CASE="lower_case" />
<AMSHOWDIALOG WINDOWTITLE="The text converted to lower case.">
%theVar%</AMSHOWDIALOG>
<AMTEXT ACTIVITY="convert_case" TEXT="%theVar%" 
RESULTVARIABLE="theVar" CASE="proper_case" />
<AMSHOWDIALOG WINDOWTITLE="The text converted 
to proper sentence case.">%theVar%</AMSHOWDIALOG>