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

Removing special characters from field name

johannescruz
5 - Atom

Hi everyone,

I have this issue where I have to import a .csv file with a lot of quotation marks in it. All the field names have quotation around the actual names. I have no problems in getting rid of these when it comes to the field values. But when I want to remove the quotations from the field names themselves I have no luck.

 

I know I could use the Selection tool and then manually rename all the field names. However I have a lot of different field and would like to do this in a more effective manner.

 

For the fields themselves I used the Multi-Field Formula and typed "REGEX_Replace([_CurrentField_], '"', '')"

 

I tried doing the same for the field names: "REGEX_Replace([_CurrentFieldName_], '"', '')"

It had no effect.

 

Does anyone know how to guide me forward in this?

 

(Attached is a screenshot of some field names)

//Johannes

5 REPLIES 5
estherb47
15 - Aurora
15 - Aurora

Hi @johannescruz 

 

Have you tried a simple "Replace" function in the Dynamic Rename tool? in this instance, where you are replacing quote marks, you don't need to use Regex_Replace, which is for pattern recognition. You could also try the ReplaceChar function.

 

Let me know if that helps.

 

Cheers!

Esther

johannescruz
5 - Atom

Thanks for replying!

 

I have tried both but with no luck.

The Dynamic Rename does not accept _CurrentFieldName_ but only fields themselves (variables).

And for the ReplaceChar function, I tried that one in a Multi-Field Formula. Unfortunately with no success.

 

I gladly receive all and any advice for this problem 🙂

//Johannes

estherb47
15 - Aurora
15 - Aurora

Hi @johannescruz 

 

Make sure, in the Dynamic Rename tool, that you select the fields that you want to fix the names for. I've attached a picture of the configuration that worked for me. Under "Current Field" in the properties window/Variables, you should see [_CurrentField_] as an option. that's the one you need to use here rather than CurrentFieldName

EstherB47_0-1582902464396.png

 

Cheers!

Esther

 

johannescruz
5 - Atom

It seems I was too fast this time 😃

 

This worked great! Thanks a million!

//Johannes

estherb47
15 - Aurora
15 - Aurora

@johannescruz 

 

So glad to help!!

 

Cheers,

Esther

Labels