Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

How do I pad leading Zeros?

Highlighted
6 - Meteoroid

I have:

1234500

 

I want:

00001234500

 

I'm new.

Highlighted
16 - Nebula
16 - Nebula

The padleft function should do the trick: 

PadLeft([Field1],11,"0")

If it's a numeric field, you would want to add a tostring first:

 

PadLeft(tostring([Field1]),11,"0")
Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@patrick_digan,

 

I know you're thinking, "I'm going to beat Marquee Crew" to the answer."  You know what?  You beat me!

 

Happy Friday 🙂

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
6 - Meteoroid

Thanks very much for that.

Highlighted
6 - Meteoroid

Now if you could just finish up the rest of my broken workflow..  lol.

Highlighted
6 - Meteoroid

I'll have to remember that - when all else fails.

Highlighted
7 - Meteor

You all are brilliant. That's all. Cheers.

Highlighted
8 - Asteroid

I'm new. What data types does this work with? Also, does it matter if it's VW String, VString, String?

Highlighted
8 - Asteroid
 
Highlighted
Alteryx Certified Partner

Hey @anthony123

 

Any string will do

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

Labels