Alteryx Designer Desktop Discussions

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

Embedded Newlines

amanda
6 - Meteoroid

Hi all!

 

I have 26 fields in my file and I want to remove embedded newlines from all of them. Currently I am selecting each field and text to columns by \n and then selecting the first field the text to columns creates. Is there a way to do this in 1 tool for all fields so I don't have to do 26 times? I tried a multi field formula with REGEX_Replace([_CurrentField_], "\n", "") and it is still outputting with newlines detected. 

7 REPLIES 7
PhilipMannering
16 - Nebula
16 - Nebula

What about if you replace the "\n" with a literal new line? That is,

REGEX_Replace([_CurrentField_], "
", "") 

Or I think the Cleanse Tool can get rid of line breaks.

amanda
6 - Meteoroid

That did not work, still getting newlines detected in data on output. 

PhilipMannering
16 - Nebula
16 - Nebula

Hmmm.. the Cleanse Tool should do the job. Are you able to share an excerpt of the data with embedded new lines?

amanda
6 - Meteoroid

Looks like if I do the Cleanse and check the one that has Leading, trailing and duplicate white space it seems to remove theoutput error. I will run on whole file and make sure. Thanks!

grazitti_sapna
17 - Castor

Hi @amanda , data cleanse tool will your right option to perform this operation of removing embedded new lines. You can follow this configuration and I hope you will achieve your desired output. Please refer to the screenshot.

grazitti_sapna_0-1606376675252.png

 

If this helps, kindly mark this post as solution.

 

Thanks.

Sapna Gupta
FRANCISCO78
5 - Atom

I tried this for a similar issue and it worked. Thanks!.

kurshumovzlatin
5 - Atom
Spoiler
 

My solution 

Labels