How-To Zero Pad field with Edit Fields node

Try adding .toString() before any other methods.
So it will be {{ $json.receiver_site_name.toString().padStart(10,‘0’) }}

padStart() is a String method so it won’t work on number types.

i don’t think it’s possible to have leading 0s in a number type in JS, which is why it needs to be converted to string.

If that doesn’t work try it in a code node, that will give you a better error message to share

1 Like