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

Add to V-String Column

NBPSE
8 - Asteroid

I am trying to add "0000" 4 zeros to the end of my current v-string column. I am using a formula tool, the Column = Column + "0000" and it isn't adding the zeros. Do you know why this could be happening, or a better way to do this?

12 REPLIES 12
abacon
12 - Quasar
binuacs
21 - Polaris

@NBPSE make sure the result is not truncated because of the field size

image.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @NBPSE,

 

Here is a solution.

 

Concat Columns.png

 

@abacon, Pad function is not a right method for this since it might trim of number of "0"s based on string overall length. Refer below.

 

Concat Columns - 2.png

 

Hope this helps : )

abacon
12 - Quasar

@atcodedog05 Great call, I clearly misread the post. Thank you for correcting me on this.

Bacon

atcodedog05
22 - Nova
22 - Nova

No worries, happens 😅

 

Happy to explore and learn together 😁

NBPSE
8 - Asteroid

Thank you! I did this same thing yesterday and it didn't work, but it is working today. Thank you for your help!

NBPSE
8 - Asteroid

If the field size is too long it will automatically truncate the result?

atcodedog05
22 - Nova
22 - Nova

Hi @NBPSE ,

 

If the data string is longer than set datatype size than it will truncate.

atcodedog05
22 - Nova
22 - Nova

Hi @NBPSE,

 

Refer to this attached workflow.

 

Hope this helps : )

Labels
Top Solution Authors