We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

duplicate rows and then add leading zeros to the duplicates

LRC
6 - Meteoroid

Hi, I need some help on how to create duplicate rows and then add enough '0's to the duplicates to have ten digits.  So I need one set of IDs to be 'as is' and a duplicated set to be ten digits.  in the attached file, the black IDs are the original, the blue IDs are what I want to create in Alteryx.  I have figured out how to generate rows, but I can't figure out how to add the 0 to only some of the rows, so not sure if that is the best way.  Thanks for any help.

4 REPLIES 4
apathetichell
20 - Arcturus

padleft([Associate ID],10,"0")

mceleavey
17 - Castor
17 - Castor

Hi @LRC ,

 

Very simple, my friend. 

You simply need to take the stream into a formula tool, use the Padleft() function, and union back together:

 

mceleavey_0-1619555869439.png

I've attached the workflow for you.

 

Hope this helps.

 

M.



Bulien

LRC
6 - Meteoroid
Hi @mceleavey, Thank you very much for the solution and quick response. I read through it, understand what you did, and plugged it in successfully. I appreciate your help. Lynn
mceleavey
17 - Castor
17 - Castor

Hi @LRC ,

 

No problem at all. I happened to be at my PC despite my incredibly rich and varied social life.

 

M.



Bulien

Labels
Top Solution Authors