Skip to content

Length Operation: length

The length operation under the String Operations function is used to calculate the total number of characters in a given string, including spaces. This operation helps determine the size of a string, which is useful for data validation, formatting, or processing workflows.

Example: Suppose you have a string “HuLoop Automation” and want to calculate the total number of characters in the string, including spaces.

Steps to Configure:

  1. Add a new step.
  2. Select Set a Variable Value from the Action dropdown.
  3. Enter a variable name in the Element Key field (e.g., StringLength). This variable will store the length of the string.
  4. Click on Form, select Functions, and choose String Operations.
  5. Provide the following parameters:
    • Operation: Choose length.
    • Data: Enter the string for which you want to calculate the length (e.g., “HuLoop Automation”).
  6. Click Save.
scrn-length-operation-tabular-view
Tabular View
scrn-length-operation-card-view
Card View

Outcome on Execution:

  • The operation calculates the length of the string, including spaces.
  • For the string “HuLoop Automation“, the length is 17.
  • The result (17) is stored in the variable defined in the Element Key field (e.g., StringLength).
  • This variable can be referenced in subsequent automation steps using the syntax ${Variablename} (e.g., ${StringLength}).

Back To Top