SOLVED
Dynamic Rename
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
jlfromm
8 - Asteroid
‎12-07-2022
09:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My columns look like this and I want to replace all of the _ with a space what expression in the Dynamic Rename would I use ?
Solved! Go to Solution.
Labels:
- Labels:
- Dynamic Processing
- Interface Tools
4 REPLIES 4
17 - Castor
‎12-07-2022
09:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @jlfromm, you'd want to use the following expression:
Replace([_CurrentField_],'_',' ')
Before:
After:
‎12-07-2022
09:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you
17 - Castor
‎12-07-2022
09:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
No problem. Just had a closer look and noticed that some of your fields have duplicate underscores and so the above expression will give you field names like this:
However, if you use this expression, this will prevent duplicate spaces coming in as the replacement:
Regex_Replace([_CurrentField_],'_+',' ')
PanPP
Alteryx Alumni (Retired)
‎12-07-2022
09:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can always use a select tool after the dynamic replace tool to rename columns.
In the dynamic replace tool, you have multiple options as well (See below)
replacechar([_CurrentField_], " _ ", " ")
REGEX_Replace([_CurrentField_], "\_+", " ")
Regex_Replace([_CurrentField_],'_+',' ')
