Get String Length

This is a pre-built Action located under the @Generic Element. The functionality of this Action in Avo Assure is to count the total number of characters in the given input text. The character count is then stored in a dynamic variable.

Syntax

Input Value: <string>

Note:

  • The string count starts from the 1st index.

  • The string length includes all characters in the input text, including spaces.

Argument
Description

<string> (Required)

Provide the string to calculate its length.

Output Value: <Dynamic Varibale>;<Dynamic Variable>(Optional)

Argument
Description

<Dynamic Variable>

(Required)

This dynamic variable holds the calculated string length (as a number).

<Dynamic Variable>

(Optional)

This dynamic variable stores the operation status as True or False.

Example: Getting the Length of a String

In this example, we explain how to calculate the total number of characters in a string, including spaces.

  • Action: Get String Length

  • Input Value: SAP is one of the most widely used ERP systems across industries.

    • This specifies the string whose total length (including spaces) need to count.

  • Output Value: {String Len}

    • The total count of characters (65) is stored in this {String Len} dynamic variable for further use.

    • If the second output variable is defined, it stores the action status with the following possible values:

      • True: If the string length is successfully calculated.

      • False: If the operation fails due to an invalid or empty input string.

  • Logical Explanation: The Get String Length action fetches the value from the Input Value column (SAP is one of the most widely used ERP systems across industries) and counts all characters, including spaces. The total length (65) is then stored in the {String Len} variable.

Knowledge Bites:

Here are some examples of different string scenarios:

String
Input Value
Result

Text Strings

Automation Framework

20

Numeric Strings

123456

6

Special Character

14

Alphanumeric strings

ID202556

8

Last updated

Was this helpful?