Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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
Highlighted
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

Specialist II
Specialist II

If you want to completely remove it, use:

purgechar(FIELD, chr(10))

Highlighted
Not applicable

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
Highlighted
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!