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

How do I pad leading Zeros?

brad_shannon
メテオロイド

I have:

1234500

 

I want:

00001234500

 

I'm new.

13件の返信13
patrick_digan
17 - Castor
17 - Castor

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")
MarqueeCrew
20 - Arcturus
20 - Arcturus

@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 restart. Order shall return.
Please Subscribe to my youTube channel.
brad_shannon
メテオロイド

Thanks very much for that.

brad_shannon
メテオロイド

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

brad_shannon
メテオロイド

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

jcornale
メテオール

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

anthony123
アステロイド

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

anthony123
アステロイド
 
LordNeilLord
オーロラ

Hey @anthony123

 

Any string will do

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

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