Qlik Community

QlikView Management

Discussion Board for collaboration on QlikView Management.

QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
New Contributor III

Qlikview Email Alert - Retaining Line Breaks

I've created an email alert using the below expression for the body of the message. The issue is that the line breaks are being removed and the user has to click 'Restore Line Breaks' every time to view the email in the correct format, i've tried using both chr(10) and chr(13) and switching the email format from 'Plain' to 'html' in the QMC Mail Server settings. 

Body of message:

=' THIS IS A TEST ' & chr(10) & chr(10) &

'The following non-medley POs were created yesterday for medley approved vendors:' & chr(10) & chr(10) &

Concat(aggr(if(Medley_Approved='Y' and Order_Date >= date(today()-5) and PO_Type <> 'M' and PO_Type<> 'E',
Buyer_BuyerName & ' |' & right(' ' & 'PO ' & PO#, 10) & ' |' & ' ' & Vendor#_Name & ' |'& ' ' & num(sum(Ordered),'#,##0') & ' Units' & chr(13)),Vendor_Number,PO#))

LineBreaks.PNGRemoved Line BreaksRestoredLineBreaks.PNGRestored Line Breaks


Labels (3)
2 Replies

Re: Qlikview Email Alert - Retaining Line Breaks

I have not tested myself but since you are using HTML, why not using proper HTML code like <br>? Just replace "chr(10)" byt "<br>" and send the email with that.

If that works, think of creating a <table> with <tr>, <td>, etc. It might be a lot of work, though, so take that into account as well.

Also, it will depend on the client. Some work with Chr(10), some with Chr(13) and some need both to display the new line and the return carriage.


Re: Qlikview Email Alert - Retaining Line Breaks

Scott, Miguel appears to be on the right track given I checked our templates, and they are using what he suggests, so I think this is the correct solution, but I wanted to include the Help on the page where I was looking, so you can poke around on your own there, hopefully you already got things sorted, if so, and Miguel's post helped, be sure to give him credit by using the Accept as Solution button on his post as well, or if you did something else, you can share that and then mark it as well.



To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.