Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

General Discussions has some can't miss conversations going on right now! From conversations about automation to sharing your favorite Alteryx memes, there's something for everyone. Make it part of your community routine!

SOLVED

This cell has embedded newlines

eblee
6 - Meteoroid

Hello,

 

It looks like my database includes some cells that have embedded newlines. I am trying to pull line items that contain "business development", and the filter function is having trouble identifying those with "business" in one line, and "development" in the next (within the same cell). I need to search for these two words together with the space in between, because otherwise i get results like "business requirements development".

 

Is there a way to remove these breaks within a cell in Alteryx? For example, something similar to the "Clean" function in Excel. I tried using the "Trim" function but that only seems to get rid of whitespace.

 

Thank you!

 

RodL
Alteryx Alumni (Retired)

Try using the RegEx tool. You can use the Replace Method with the '\n' to search for any new line characters and replace it with ' ' (or a blank string).

jdunkerley79
16 - Nebula
16 - Nebula

You could also use a filter tool with a Regex Match formula to select there cells:

 

REGEX_Match([Field1], 'Business\s+Development')

The \s+ will match all whitespace (tabs, new lines, spaces) between business and development

 

Alternatively a formula tool like could be used to normalise all white space could be used:

REGEX_Replace([Field1], '\s+', ' ')
chris_love
12 - Quasar
Believe it or not you can also enter a carriage return into a formula and
alteryx will understand it. eg. Have a filter formula that says:

[field] = 'Business
Development'
eblee
6 - Meteoroid

Thank you! The RegEx worked by replacing it with a blank string. Everyone's comments were really helpful!

HemantWalia
5 - Atom

Hi,

 

I know this is old post I am replying to, not sure if you are still around in community.

 

I am using a crew macro to write the log to an output file, in my case, the warning is thrown but I cannot see newline in the text file. The complete log look like a big string. Do you know if there is a way to preserve newline so that while writing to file it does not ignore that.

Labels