Type conversion

You can temporarily convert the values inside a Boolean, Number, or String variable from one type to another type (typecasting) to use within one action. For example, use

lt;YourStringVariable>.String:toNumber$ to convert the value of a string variable to a number variable to perform mathematical operations.

In the text field, enter

lt;variable name>.. After you enter the period, the auto-fill suggests possible actions such as toNumber.

Variable type Typecasting options
Boolean
  • invert: Converts the Boolean value to the opposite value (True to False and False to True).
  • toNumber: Converts the Boolean value to a numeric value (True to 1 and False to 0).
  • toString: Converts the Boolean value to a string value.
Number
  • decrement: Decreases the number value by one.
  • increment: Increases the number value by one.
  • toString: Converts the number value to a string value.
    Note: When you convert a number value to a string value and if the number has a decimal value, the decimal value is removed after conversion. For example, 15.234 will be shown as 15 when you convert it.
String
  • length: Returns the number of characters in the string as a numeric value.
  • lowercase: Converts the characters in the string to lowercase.
  • reverse: Reverses the characters in the string.
  • toBoolean: Converts the string value to a Boolean value.
  • toNumber: Converts the string value to a number value. The limits of the String to Number action apply here.

    See String to number action .

  • trim: Trims blanks and whitespaces from the string.
  • uppercase: Converts the characters in the string to uppercase.
Note: Type casting is not supported for the following scenarios:
  • As a value that is passed between bots.
  • As a property value for an object captured with the Universal Recorder.

    Object properties