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:
- Add a new step.
- Select Set a Variable Value from the Action dropdown.
- Enter a variable name in the Element Key field (e.g., StringLength). This variable will store the length of the string.
- Click on Form, select Functions, and choose String Operations.
- Provide the following parameters:
- Operation: Choose length.
- Data: Enter the string for which you want to calculate the length (e.g., “HuLoop Automation”).
- Click Save.


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}).