Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

String package

  • Updated: 2022/08/18
    • Automation 360 v.x
    • Build
    • Enterprise

String package

Use the String package to perform various operations such as comparing two strings, retrieving the string length, or converting a string to uppercase or lowercase.

Actions in the String package

The String package includes the following actions:

Action Description
Assign Assigns or concatenates strings.
  • Optional: In the Select the source string variable(s)/value field, specify the variable or values. This field holds up to 65535 alphanumeric, character, and empty values.
    Note:
    • To provide a string that includes a dollar sign ($), you must enter two dollar signs. For example, if you enter Pay $$5.00, the output will be Pay $5.00.
    • The values or variables that you can specify for the String package are predefined. See Predefined variables
  • In the Select the destination string variable field, specify the variable.
Compare Compares two strings.
  • In the Source string field, specify the source string.
  • In the Compare to string field, specify the string that the source has to be compared with.
  • In the When comparing field, select an option:
    • Match case: Matches capitalization.
    • Do not match case: Does not match capitalization.
  • In the Assign the output to variable list, specify the Boolean variable.
Extract text See Using the Extract text action.
Evaluate variable Compares the user-specified string variable with the string variables in the bot and if a match is found, the action returns the value of the matching variable.
  • Enter the string variable to search for.
  • In the Assign the value to a variable field, select a string variable to hold the returned value.
Example:
  1. Create a variable of type string whose value you want to evaluate and name it var1. Here the value of the variable var1 is $cityname$ and $cityname$ has the value Paris.
  2. Enter $var1$ in the Variable expression field.
  3. On bot execution, the user specified string variable $var1$ 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.
Note: This action can evaluate only string variables and up to one level of nesting.
Find See Using Find action.
Generate random string Generates a string of uppercase and lowercase alphanumeric characters and assigns it to a string variable.
  • In the String length field, enter the number of characters in the generated string.
    Note: The maximum number of characters is 300.
  • In the Enter the destination variable field, specify the string variable.
Import string from text file Imports values from a variable in a text file into a string variable.
  • Select the text file from the Control Room, desktop, or a file variable.
  • In the Variable key field, specify the variable that holds the values to import. This field is not case-sensitive.

    When a bot runs this action, it retrieves the values between the = sign and line break.

  • In the Assign the output to variable list, specify the variable.
Note: If you built a bot using this action from the String package from Build 5322 or earlier, the action will be missing when you open the bot with the default package version. You must reinsert the action and repopulate the fields.
Length Retrieves the string length.
  • In the Source string field, specify the source string.
  • In the Assign the output to