Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

String package

  • Updated: 10/09/2021
    • Automation 360 v.x
    • Build
    • RPA Workspace

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.
  • 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 source string.
  • 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.
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 variable list, specify the number variable.
Lowercase Converts the source string to lowercase.
  • In the Source string field, specify the source string.
  • In the Assign the output to variable list, specify the variable.
Replace See Using Replace action.
Reverse Reverses the source string.
  • In the Source string field, specify the source string.
  • In the Assign the output to variable list, specify the variable.
Split See Using Split action.
Substring Extracts a substring from a string.
  • In the Source string field, specify the source string.
  • In the Start from field, specify the starting point.
  • Optional: In the Length field, specify the length.
  • In the Assign the output to variable list, specify the variable.
To boolean Converts a string to a Boolean.
  • In the Source string field, specify the source string.
  • In the Assign the output to variable list, specify the Boolean variable.
To locale number Converts a string to a locale-formatted number.
  • In the Source value field, specify the source string.
  • Select any of the following tab to specify locale:
    • Specify: Manually specify the two letter ISO codes for the locale you want to use in the Locale field.
    • Device: Use the default locale configured for the device.
  • In the Save the outcome to a variable list, specify the variable.

You can also use the action in an expression. For example, $prompt-assignment.String:toLocaleNumber("en-US")$.

To number Converts a string to a number. This action supports positive, negative, and decimal numbers.
Note: If the string contains commas, remove them by using the Replace action to replace each comma with an empty string.
  • In the Source string field, specify the source string.
  • In the Assign the output to variable list, specify the number variable.
Trim Trims blanks and whitespaces from a string.
  • In the Source string field, specify the source string.
  • In Trim from the beginning and Trim from the end, select options.
  • In the Assign the output to variable list, specify the variable.
Uppercase Converts the source string to uppercase.
  • In the Source string field, specify the source string.
  • In the Assign the output to variable list, specify the variable.

Watch the following video on how to use the String actions:

Send Feedback