Alteryx Designer Desktop Discussions

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

Removing spaces, special symbols in header

mszpot89
9 - Comet

My input txt file has multiple fields:

 

Processing Location,

Switch In   Out,

Switch In - Out,

Total Sell Amount,

 

I want to remove all special characters, spaces and get below format:

ProcessingLocation,

SwitchInOut,

SwitchInOut,

TotalSellAmount

 

Final outcome:

 

Processing Location,

Switch In & Out,

Switch In & Out,

Total Sell Amount,

 

2 REPLIES 2
jdunkerley79
ACE Emeritus
ACE Emeritus

You can use a dynamic rename to do the first part:

 

2018-10-22_08-05-42.png

 

Note you cannot have fields with the same name so the 'Switch In - Out' ends up SwitchInOut2

 

For the second part, to rename to final names, would need to understand the logic further. You could use a regular expression to add spaces before capitals or a switch statement to lookup and rename fields as needed.

 

I have attached a sample doing this.

mszpot89
9 - Comet

@jdunkerley79 - great thanks! original workflow I developed was much longer!

 

"Switch In   Out" and "Switch In - Out" were put together only for testing purpose.

After rename I will use simple select tool and that should do the trick.

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels