Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to remove parentheses and their content from a string

bjemison
7 - Meteor

I am completely new at Alteryx (~2 weeks) and am still trying to get familiar with all of the tools. I have some data in the following format:

 

Product Name (Customer Info) Product Description

 

I am trying to get the following:

Product Name Product Description

 

I have seen a couple of other questions and comments posted and one user suggested the following formula:

Regex_Replace([Field1]," \(.*?\)","")

I tried doing this. I made sure to replace [Field1] with the actual name of the column I'm trying to alter. The data preview shows output how I am expecting it (albiet without the space between Product Name and Product Description). However when I run the workflow it errors out completely and I get the error message below:

 

The field "" is not contained in the record. (Expression #1)

Regex_Replace([Field1]), " \(.*?\)","")

 

Does anyone know what I am doing wrong. 

 

 

3 REPLIES 3
CharlieS
17 - Castor
17 - Castor

EDIT: @jdunkerley79 addressed the real issue. Nice work.

jdunkerley79
ACE Emeritus
ACE Emeritus

You need to create a new field in the formula tool to store the output (or select to overwrite Field1)

2018-11-28_22-08-05.png

 

Select a column or Add A column in the shown drop down and error should go away

 

The expression you have should produce the output you want then I think.

 

bjemison
7 - Meteor

This did the trick. I needed to specify the new output column. Thank you so much for taking the time to answer!

Labels