Alteryx Designer Desktop Discussions

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

Remove new line characters

Echo
5 - Atom

Hi all,

 

I am trying to remove new line characters present in the data.

Currently we are using the "formula" macro and input Regex_Replace([FIELD], "\r*\n*", "") for each and every field.

 

When working with 100+ columns it becomes very cumbersome.

Is there a way to remove new line characters in one go from all columns?

 

Thanks.

 

13 REPLIES 13
AmeliaG
Alteryx
Alteryx

@Sheila29

 

It's not clear from your screenshots where you data is being truncated as you didn't include the size. If one of the Alteryx tools is truncated the data, you will receive a yellow message in the results window telling you a value has been truncated. This message will be associated with a tool and this is where you will need to make your change. 

 

If you aren't seeing that message then it is most likely that your data was truncated before you brought it into Alteryx. 

 

Hope this helps!

 

Amelia

nicho_x86
6 - Meteoroid

The new line can be treated as a character when specifying the standard assigned integer to it.

 

The following will remove new line from the current field (10 is the code for new line):

 

ReplaceChar([_CurrentField_],CharFromInt(10),"")

JesterOne
7 - Meteor

My Solution

Spoiler
JesterOne_0-1618828230218.png

 

NicolasSz
11 - Bolide

Hey,

 

Just a quick update on this for those that want to replace the carriage return by another character.

You should be using : Regex_Replace([FIELD], "\r*\n", "") and not a * after the n.

Else it matches with all char.

 

Regards

Labels