SOLVED
Alteryx Alternative to Excel Text Function
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
PKoya
8 - Asteroid
‎02-26-2021
04:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I am trying to achieve an outcome similar to the example below where I want to convert a number of less than or equal to 8 digits into a string as this would be a unique identifier and needs to be concatenated with another string.
E.g. 12345 will become 00012345.
I am sure its something very simple and I have looked around but I am unable to find a solution to this.
If anyone can suggest a solution, it would extremely helpful.
Solved! Go to Solution.
Labels:
- Labels:
- Expression
3 REPLIES 3
17 - Castor
‎02-26-2021
04:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @PKoya,
This is the formula that you are looking for:
FieldName
PadLeft(ToString([FieldName]),8,"0")
Please mark my post as a solution if this was helpful!
17 - Castor
‎02-26-2021
05:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎02-28-2021
10:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks, @Emil_Kos for your solution. 🙂
