Evaluate variable action
- Updated: 2024/06/27
Evaluate variable action
Use the Evaluate variable action in the String package to compare the user-specified string variable with the string variables in the bot. If a match is found, the action returns the value of the matching variable.
Settings
- In the Variable expression field, enter the string variable that you want to find.
- In the Assign the value to a variable field, select a string variable to hold the returned value.
Note:
- Only user defined string variables without expressions are supported. Fields with expressions such as $SampleNumber.Number:toString$ or $SampleString.String:lowercase$ are not supported.
- System string variables such as $System:AATaskName$ are not supported.
- Variable data types other than string type are not supported. For example, $SampleNumber$ is not supported.
- Case insensitive variable names are not supported.
Example
Assume you have an automation where you defined a string variable named
$cityname$
. The value of the variable $cityname$
is
set to Paris
. You can now build a bot and use the
Evaluate variable
action to compare the variable that you create, with an already existing
string variable in the bot. If a match is found, then the action returns the value of the matched variable.- Create a variable of type string whose value you want to evaluate and name it eva1.
- In the Default value field, enter $cityname$.Note: $cityname$ is the string variable that you have used in the bot.
- Enter $eva1$ in the Variable expression field.
- When you execute your automation, the user specified string variable
$eva1$
now searches among the variables defined in the bot for the string variable$cityname$
and if the match is found then the action returns the output value of the matched variable$cityname$
, that is,Paris
.