Alteryx Designer Discussions

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

General Discussions has some can't miss conversations going on right now! From conversations about automation to sharing your favorite Alteryx memes, there's something for everyone. Make it part of your community routine!

SOLVED

Limit number of characters in cell

skeen503979
8 - Asteroid

Hello,

 

I want to eliminate some leading zeros at the beginning of a string of numbers.  Each list should only contain 15 numbers (the first of which might be a zero).  How can I eliminate the leading zeros so that all that remains are the 15 characters?  I'm guessing there are a few ways to accomplish this.

Thoughts?

 

skeen503979_0-1614018288368.png

 

AngelosPachis
14 - Magnetar

Hi @skeen503979 ,

 

One way would be to first of all trim all leading zeros from the left hand side of the numbers. Then you can pad it on the left with zeros, until you get 15 digits in total

 

AngelosPachis_0-1614019654269.png

 

You can do it in a single expression as well 

 

 

PadLeft(TrimLeft([Input],"0"), 15, "0")

 

 

Hope that helps,

 

Angelos

 

skeen503979
8 - Asteroid

Thanks, @AngelosPachis .  That helped.  I still have data that isn't linking with my Join tool, but I'll keep at it to figure out why.

AngelosPachis
14 - Magnetar

@skeen503979 Maybe the length of some string records exceed the 15 characters limit?

 

Keep working on it and compare what falls out of the R and L output anchors if you are using a regular join tool, that should help you figure this out

Labels