Text - Insert |
<AMTEXT ACTIVITY="insert" TEXT="text" RESULTVARIABLE="text" ACTION="text (options)" POSITION="number" INSERTTEXT="text" /> |
Description:
Inserts characters into the specified text and places the result in a variable.
Used as a text manipulation tool to insert new text into an existing text value.
General
Property |
Type |
Required |
Default |
Markup |
Description |
Text to insert into |
Text |
Yes |
(Empty) |
TEXT="My name is Joe" |
The target text to insert the new text into. As with every text parameter, if the data you wish to write 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.,%VarName%). |
Action to take |
Text (options) |
No |
insert_beginning |
ACTION="insert_end" |
Indicates the location in the target text in which characters should be inserted into. The available options are:
|
Position to insert text |
Number |
No |
(Empty) |
LENGTH="3" |
The position in the text to perform the insert. This parameter is available only if the Action to take parameter is set to Insert at position. |
Characters to be inserted |
Text |
Yes |
(Empty) |
INSERTTEXT="Hello" |
The characters that should be inserted. |
Populate variable with result |
Text |
Yes |
(Empty) |
RESULTVARIABLE="varname" |
The name of the variable to receive the new value after character insertion is performed. |
NOTE: The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder. |
This sample task displays a message box showing the value of a variable before and after a Text - Insert activity is used.
<AMVARIABLE NAME="theTargetText">Hello</AMVARIABLE> <AMSHOWDIALOG MESSAGE="The value before character insertion is '%theTargetText%'." /> <AMTEXTINSERT ACTION="insert_end" INSERTTEXT=" World" TARGETTEXT="%theTargetText%" RESULTVARIABLE="theTargetText" /> <AMSHOWDIALOG MESSAGE="The new value after character insertion is '%theTargetText%'." /> |