Using Multi-field to remove quotes in Alteryx

I stumbled across this handy formula.

Let’s say we have data that looks like this

2016-10-07_20-34-20

First thing I need to do is ‘Text to Columns’ to split the subject and level apart

2016-10-07_20-35-33

Split to 2 columns by a ‘comma’ ,. Now the data looks like below.

2016-10-07_20-36-45

We can remove the first field, but we need to remove the quotes around both the subject and level. Notice how they are both different. The subject has double quotes and the level only has single quotes. The next tool and formula will solve this. Let’s add the multi-field formula tool

2016-10-07_20-38-44

In this we want to select the 2 text fields we want to remove the quotes from. Untick the copy to new field button. Then in the formula bar use the following phrase

StripQuotes([_CurrentField_])

Your set up of this tool should look like below

2016-10-07_20-41-08

If we add a browse and run the workflow, we can see what that formula has just done. Field 11 and Field 12 are what we selected to remove the quotes from

2016-10-07_20-42-05

Hope this helps

 

Thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.