|
Environment Variables - Append |
Declaration
<AMENVVARS ACTIVITY="append" NAME="text" VALUE="text" TYPE="text (options)" RESULTVARIABLE="text" />
Description
Appends text to a user, machine or process level environment variable and populates an existing Automate variable with the resulting value.
Practical Usage
Mainly used to add or modify the value of an existing environment variable by appending text to the current value.
Parameters
Environment Variable
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Variable scope | Text | Yes | User |
|
The
scope or level belonging to the environment variable to append.
The available options are:
|
Environment variable | Text | Yes | (Empty) | NAME="TEMP" | The name of the environment variable to which the text will be appended. Click the down arrow to select from drop-down list of existing environment variables that correspond to the level specified under the Variable scope parameter. |
Text to append | Text | Yes | (Empty) | VALUE="new text" | The text to be appended to the value of the environment variable. |
Populate variable with value | Text | Yes | (Empty) | RESULTVARIABLE="VarName" | The name of an existing Automate variable in which to populate with the resulting value. |
Example
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
Description
This sample task creates a variable named theVar and then appends the text "\subtemp" to environment variable "TEMP" of type "user." Then, a message box displays the value of the %theVar% (which is the value of the TEMP environment variable with the newly appended text).
<AMVARIABLE NAME="theVar"></AMVARIABLE>
<AMENVVARS ACTIVITY="append" TYPE="USER" NAME="TEMP" VALUE="\subtemp" RESULTVARIABLE="theVar" />
<AMSHOWDIALOG>%theVar%</AMSHOWDIALOG>