SOLVED
How to Append the zeros to the existing column based on the length of the field value
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
prashanthansi
5 - Atom
‎03-24-2021
05:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
Below is my requirement:
The length for the field value in a column should be minimum 5 digits. Irrespective of the length of the string available in the field.
Example: if the field value is 1, then the Alteryx should populate the value as 00001. or
If the 12, then the value should be 00012 or
if it is 123, then the value should be 00123.
Any help,
Thanks
Solved! Go to Solution.
Labels:
- Labels:
- Expression
2 REPLIES 2
Emil_Kos
17 - Castor
‎03-24-2021
06:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
ChrisTX
16 - Nebula
‎03-24-2021
06:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Use the PadLeft function. Here is a list of all String functions: https://help.alteryx.com/current/designer/functions-quick-reference
If your field is numeric, you'll need to first convert it to string.
Chris