Alteryx Designer Desktop Discussions

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

Field names - replace the space with "_"

viswamtulasi
7 - Meteor

I'm reading the data from excel where the field names having the space in-between and I would like to replace the space with "_" 

 

Example:   Dept No,  Dept Name

 

I would like to see the Field Names as:  Dept_No,  Dept_Name 

 

I've more than 80 fields, instead of manual rename from Select Tool is there any better option and will you please suggest. 

 

Thanks in advance.

2 REPLIES 2
Kenda
16 - Nebula
16 - Nebula

Hello @viswamtulasi!

 

I would suggest using the Dynamic Rename tool (in the Developer category). Connect your data input to the L connector and nothing to the R.

 

Select Formula as the Rename Mode and select your fields. Then, use this expression:

regex_replace([_CurrentField_]," ","_")

Hope this helps!

ponraj
13 - Pulsar

Attaching a sample workflow for your case.  You can also achieve your results using Dynamic Rename tool with following configuration options. 

Rename Mode: Formula

Select the fields you want to rename

Expression: Replace([_CurrentField_], " ", "_")

Configuration window.PNGWorkflow.PNGResults.PNG

Labels