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.
@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& -]", "")
See the image below.
@JeniReno This inst pretty but its the best I could do with the time I have
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.
Thank you. That's exactly what I was imaging, but I'm having trouble with the F&R tool.
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
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:
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.
I'm so sorry. I think I finally got it. Thank you for the pictures, Cristiane!