Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Possible to remove new lines from a field?

I have a field called Comments and the values in the field (strings) sometimes include new lines.  The issue is when I represent this field on a straight table, even with the cell wrap upped to 4 lines, some of the string is getting cut off.  I am wondering if it's possible to remove new lines all together from the values in the field? 

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Try:

replace(FIELD, chr(10), ' ')

This will replace the new lines with a space.

Hope this helps!

View solution in original post

4 Replies
jerem1234
Specialist II
Specialist II

Try:

replace(FIELD, chr(10), ' ')

This will replace the new lines with a space.

Hope this helps!

jerem1234
Specialist II
Specialist II

If you want to completely remove it, use:

purgechar(FIELD, chr(10))

Not applicable
Author

Hi,

check the applicaton. Test data is as below.

IDComments
11 First String
1 Second String
1 Third String
22 First String
2 Second String
33 Frist String
44 Frist String
55 Frist String
5 Second String
5 Third String
5 Fourth String
5 Fifth String
yakir_manor
Contributor III
Contributor III

see the following links:

1. Newline - Wikipedia

2. Whitespace - Wikipedia

for me i needed to remove newline and whitespace so i use:

let vNewString = replace(replace(replace(vString, chr(13), ''), chr(10), ''), ' ', '');


enjoy!