Find & Replace Assistance
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello. I'm very new to Alteryx, and I'm having trouble setting up the Find & Replace tool, but I might be using the wrong tool?
I have a file wherein only 2 symbols are permitted (a hyphen and an ampersand), so anything else needs to be removed/corrected. I also sometimes see HTML in the source files (usually just for an apostrophe and/or ampersands), which have to be corrected (apostrophe must be removed, ampersand must be corrected back to the symbol). Unfortunately, the forum won't allow me to post the example with any HTML code, so I had to remove it.
Here are the conditions I need to look for and correct:
Appreciate the help.
ORIGINAL NAME (with the issue) | CORRECTED NAME |
MR. VICTOR SMITH | MR VICTOR SMITH |
WOLTZ HTML for and ampersandWIND FORD | WOLTZ & WIND FORD |
EDDYHTML for an apostrophe CHEVROLET | EDDYS CHEVROLET |
WE #3 GOSSET LLC | WE 3 GOSSET LLC |
ROBERT /AZZOLLINI | ROBERT AZZOLLINI |
BARBARA'S AUTOLAND | BARBARAS AUTOLAND |
Solved! Go to Solution.
- Labels:
- Custom Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@JeniReno can you show us an example with this HTML code and also for start you can use this Regex in a formula to get you started:
REGEX_Replace([ORIGINAL NAME (with the issue)], "[^A-Za-z0-9& -]", "")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
See the image below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@JeniReno This inst pretty but its the best I could do with the time I have
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This is what worked for me when I tried to replicate your situation: I created the following table and used it as the reference for the Find and Replace tool. I connected the original table to the F anchor, and the reference table in the R anchor.
FOUND | REPLACE |
HTML for ampersand | |
HTML for apostrophe | & |
# | |
/ | |
' |
The final result was identical to your CORRECTED NAME column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you. That's exactly what I was imaging, but I'm having trouble with the F&R tool.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You need a text input tool containing what you want to find and replace then the connect it to the R side of the tool
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Good! So all you need to do is create the reference table (the blank cells are empty, so they show as [Null] after running the workflow) using the Text Input tool, and then connect it to the R anchor of the Find Replace tool.
If your reference table has the same column names as mine, the configurtion of the Find Replace tool should be:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I think my screenshot was misleading. I do have an input already, but when I insert the "Find & Replace" tool, my "Fina Value" is showing the NAME or TITLE Line 1 (Missing) in red (an error, I presume), and I don't seem to have the ability to change it. Find Within Field = Name or TITLE Line 1 is correct.
Hopefully, the screenshots help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm so sorry. I think I finally got it. Thank you for the pictures, Cristiane!
