on 02-16-2017 06:31 PM - edited a week ago by jrlindem
This article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the Find Replace Tool on our way to mastering the Alteryx Designer:
The Find Replace Tool is one of those tools that goes relatively unused and uncelebrated until you stumble into a data blending technique that would be extremely difficult without it – at which point, it becomes your favorite tool in the Designer.
Find Replace to the rescue
You can find it in the Join Category (Ribbon) of Alteryx Designer and it’ll make easy string substitutions in your data that would otherwise require a herculean effort to work around.
Today, we celebrate Find Replace as a hero by exploring three use-cases that exemplify how the Find Replace Tool can be put to good use.
Replacing Text within a String (attached in Find Replace.yxzp):
In this first example, making HTML or ASCII substitutions is effortless using the Find and Replace configuration options in the Find Replace Tool:
Using Lookup Tables to Standardize Data (attached in Find Replace.yxzp):
In this second example, address abbreviations are easily swapped out with their full text counterparts. There are many examples where crosswalks, like this, can be leveraged to normalize data, leaving you with more normalized outputs.
For these first two use cases (and more), users are able to perform a variety of useful replacements within their data. For more on this, considering the following article: Simplify parsing with Find Replace
Appending New Data
Lastly, the Find Replace Tool can also append data, similar to Microsoft Excels VLOOKUP function. Note that only the first value found within the reference table will be appended to the main dataset. You have the option to include the related field, as well as one or many other fields you want to append.
Additional configuration options allow for matching to occur on the: Beginning of a Field, Any Part of Field, or Entire Field. Case sensitivity can be toggled on and off as well an option to require matching on whole words only.
For more information and example workflows, navigate to the Control Container Tool in Alteryx Designer and select “Open Example”
By now, you should have expert-level proficiency with the Find Replace Tool! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at community@alteryx.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.
Stay tuned with our latest posts every Tool Tuesday by following Alteryx on Twitter! If you want to master all the Designer tools, consider subscribing for email notifications.
**Note: The graphics contained within this Tool Mastery article have been updated to reflect the current look and feel of Alteryx Designer. The attached workflow may vary slightly from the examples.
Additional Information
Click on the corresponding language link below to access this article in another language -
Portuguese
Spanish
French
German
Japanese
Your second figure shows the tool configured to replace with the filed Replacement, but this field is not present in the input data shown in the figure.
Hi @deargle, 'Replacement' field is the Text Input 'Lookup Table'.
Cheers!
Why would the top line of the output not be '11 North Warren Circircle Lisbon Falls.....', as it should pick up the Cir in circle and change it circle?
Thanks
Lewis
Hi @Lewis,
actually, it would be Circlecle haha
I think the option 'Match Whole Word Only' was enabled in the configuration when they got those results, but it was disabled when they took the screenshot
Peace
Ricardo
does this work to replace a column header? In one of my existing workflows built, one of the columns names was "Department", and the source data has since changed from department to "Business Unit".
Is there a way to rename every instance of the column name "Department" to "Business Unit"?
TIA!
You didn't discuss much about the Append part of find & replace
very helpful. do we have a tool to find and replace multi-fields?
Just wanted to flag that the Lookup List attached in the workflow has a double entry for
Not that it impacts the functioning of the tool, just saw that as I used the same list in my workflow and noticed the small issue 🙂
thanks for good example
onehelp ?
I am also trying to make screenshot like you did to capture some of the events in my workflow to document it.. can you help me how you did it
thank you!
The images in the article are not off-the-shelf screenshots. What he did to generate those was to take shots of the data as viewed in the Results windows of the respective tools, and then use Comment tools with those images as backgrounds.
@LisaL -you are awesome.
Thanks for the help - I figured it out when I was making a not on Wordpad. then it clicked on my mind that I could take a screenshot and use it in the comment box as a background image.
And for the Line behind it - connector line: I was thinking about as well. Then gave a thought about it and came to the conclusion @MattD must have used the browse tool or any other tool to connect with it and moved it to Back before using the Comment tool.
How can we use the replace table to remove parentheses? I am unsure what replacement value I should input to recieve a blank space out of the replacement table.
Hi @tasc4166! I think you should post this questions in our Designer Discussions board for more visibility. 😉
This is good and thank you.
You didn't discuss much about the Append part of find & replace
A fresh look to the beloved Find Replace Tool Mastery article. One of the unsung heroes of many workflows, the information contained within this article helps provide instruction and guidance on when and how this tool can be used to simplify and streamline your workflows. In this recent update, the Append Feature has also been included.
How are you using the Find Replace Tool in your solutions?