← All nodes
Text

Substring / Pad

Takes characters by position — from a start, the first few or the last few — or pads text to a fixed width, like 123 → 000123.

When to use it

Use it for fixed-width codes (account numbers, ZIP codes that lost their leading zeros), to cut a prefix or suffix, or to build fixed-width files.

In a pipeline

Settings

SettingTypeRequiredDefault or hint
ColumnselectYesSelect column…
Modeselect—pad-left
Widthnumber—6
Pad withtext—0 on the left, a space on the right
Start at characternumber—1
How many charactersnumber—Blank: to the end
Generate New Columncheckbox—true
New Column Nametext—Default: <column> Result
Insert Afterselect—After the column

Example

Restore leading zeros

  • Column=Account
  • Mode=Pad on the left (123 → 000123)
  • Width=6
Accounts
Account
123
45678
1234567
Padded to six
AccountAccount Result
123000123
45678045678
12345671234567

Text already at least as wide is left as it is — padding never cuts.

Worth knowing

  • Pad with defaults to 0 on the left and a space on the right.
  • Start at character counts from 1; a negative start counts from the end (-3 = the last three).
  • Leave How many characters blank to take everything to the end.

Others in Text