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.
Parameters
General
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 (for example, %variableName%). |
Convert | Text (options) | No | Upper Case |
|
The case to convert
the text to. The available options are:
|
Populate variable with result | Text | Yes | (Empty) | RESULTVARIABLE="varname" | The name of an existing variable in which to populate the newly converted text. |
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 sample task demonstrates Automate Desktop's ability to convert text to upper case, lower case and proper sentence case.
<AMVARIABLE NAME="theVar" />
<AMSHOWDIALOG ACTIVITY="input" MESSAGE="This task demonstrates Automate's ability to convert text to upper case, lower case and proper sentence case. " DEFAULTVALUE="enter a string of text here." RESULTVARIABLE="theVar" WINDOWTITLE="Text to convert" />
<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>