CommunityMember126322
Occasional Contributor

Detect CRLF character in a text line item

I have to replace CRLF (carriage return / line feed) characteres form a text line item.

How can I use the FIND function or more better the SUBSTITUE function to replace such a CRLF char.

Result = SUBSTITUE(line item to replace, CRLF character, " ")

Pius Keller
1 ACCEPTED SOLUTION

Accepted Solutions
CommunityMember126322
Occasional Contributor

Bingo - yes this will solve my problem directly:grinning_face:

Pius Keller

View solution in original post

5 REPLIES5
Alexandru.Rosca
Frequent Contributor

Hi, could you please be more specific? What is not working if using substitute function? That should suit the purpose.

AlexandruRosca_0-1657093439538.png

CommunityMember126322
Occasional Contributor

Thanks for your answers, but I want to replace the CRLF character from the text field with a space.

See below in T3 the text is abc abc, where the blank sign between first abc and 2nd abc is the CRLF caharacter.

CommunityMember126322_0-1657093735514.png

now with SUBSTITUE function I try to replace the CRLF sign with a blank/space

CommunityMember126322_1-1657093900809.png

The CR in the formula should be the CRLF character to replace.

The final result must then be "abc abc"

and not

"abc

abc"

Pius Keller
Alexandru.Rosca
Frequent Contributor

Pardon my ignorance, I see now what you mean by CR LF. Have you tried using trim? This will remove any irregular spaces

AlexandruRosca_1-1657094978797.png

CommunityMember126322
Occasional Contributor

Bingo - yes this will solve my problem directly:grinning_face:

Pius Keller
CommunityMember126322
Occasional Contributor

I found a workaround:

In "Text with CRLF" I added this text:

CommunityMember126322_1-1657095159184.png

In the line item "CRLF" I get the CRLF character with the MID function, which then I can use in the SUBSTITUTE function to replace the CRLF in any other text formatted line item (here in "Text to replace")

CommunityMember126322_0-1657095093951.png

The question remains: Is there not an easier way to have the CRLF character as a short cut to use in SUBSTITUE without my workaround?

Pius Keller