ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Pad middle with fixed character length

mzlee
7 - Meteor

Hi,

 

Let me know if there is a tool that can do this! thanks!!

 

Invoice #:  GHMCC5300 

Amount: -55611175

 

What I need to accomplish is a total string of 24 characters adding zeros before the amount but after the negative sign. The 8 is a fixed digit. 

 

8 GHMCC5300-000055611175

4 REPLIES 4
cjaneczko
13 - Pulsar

Is the Invoice and Amount on two different rows or are they in two different columns?

mzlee
7 - Meteor

They are in two different columns - thx!

cjaneczko
13 - Pulsar

Try this. 

 

'8 ' + [Invoice]+ '-' +padleft(REGEX_Replace(tostring([Amount]), '-', ''),12,'0')

 

image.pngimage.png

mzlee
7 - Meteor

This worked perfectly! thank you 

Labels
Top Solution Authors