Skip to Content

Issue Statement: Remove line feed/CRLF from text fields.

Issue: If the input text field has line feed/CRLF, then data gets shifted to subsequent fields in mapping, hence creating wrong target data.

Logic: Remove line feed/CRLF from the text

Solution: Create a simple UDF to remove line feed/CRLF

UDF Signature:

UDF_Signature.png

UDF Code:

String Input_Text1 = null;

String Input_Text2 = null;

Input_Text1 = Input_Text.replaceAll(“\\n”, “”);

Input_Text2 = Input_Text1.replaceAll(“\\r”, “”);

return Input_Text2;

Note: I am not a great Java coder 🙁 . You can use a single String field instead of using two String fields, as I did.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply