Pad Text Step
The Pad Text step adds a specific character to the beginning or end of a text string. You pick the character, its position, and how long the final text should be. This helps format data, like making sure all IDs are the same length.
How to Use the Pad Text Step
Use this step to format text by adding characters until it reaches a certain length.
- Drag and drop the Pad Text step into your process.
- (Optional) Give the step a custom Name.
- Set up the input parameters.
- Define the output variable.
Parameters Explained
Name (Optional)
- A custom name for the process step. This helps you find the step in the editor.
Source text variable (Required)
- The name of an existing text variable that holds the text you want to pad.
- Example:
myText
Pad options (Required)
- Choose where to add the pad character(s).
- Left: Adds characters to the beginning of the text.
- Right: Adds characters to the end of the text.
Pad character (Required)
- The character or symbol you want to add.
- Example:
0(to pad with zeros) or (to pad with spaces)
Total length (Required)
- The final length you want the text string to be after padding.
- Example: If your source text is "123" and total length is 5, padding with "0" on the left makes it "00123".
Destination padded text variable (Required)
- The name of a new or existing text variable where the padded text will be stored.
- Example:
paddedText
Related Articles
Need Help?
Can't find what you're looking for? Join the Robotiq Community to get help from other users and the Robotiq team.