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.
解決済み

Pad middle with fixed character length

mzlee
メテオール

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件の返信4
cjaneczko
パルサー

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

mzlee
メテオール

They are in two different columns - thx!

cjaneczko
パルサー

Try this. 

 

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

 

image.pngimage.png

mzlee
メテオール

This worked perfectly! thank you 

ラベル
トップのソリューション投稿者