Trim Operation: trim
The trim operation under the String Operations function is used to remove unnecessary spaces from a string. This includes spaces at the beginning and end, as well as extra spaces between words. The operation ensures clean and consistent string formatting for seamless automation workflows.
Example: Suppose you have a string “John Doe” with extra spaces between words. You want to trim the extra spaces and store the cleaned string in a variable named TrimmedName.
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., TrimmedName). This variable will store the trimmed string.
- Click on Form, select Functions, and choose String Operations.
- Provide the following parameters:
- Operation: Choose trim.
- Data: Enter the string to be trimmed (e.g., “John Doe“).
- Click Save.


Outcome on Execution:
- The operation removes all leading, trailing, and extra spaces between words.
- The updated string (“John Doe”) is stored in the variable defined in the Element Key field (e.g., TrimmedName).
- This variable can be referenced in subsequent automation steps using the syntax ${VariableName} (e.g., ${TrimmedName}).