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!
Solved! Go to Solution.
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).
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+', ' ')
Thank you! The RegEx worked by replacing it with a blank string. Everyone's comments were really helpful!
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.
I see you got a fix with the Regex. You could also have fixed it with your data cleansing tool by selecting the option to remove linebreaks
@RodL thanks. It worked for me too.