Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
darrellbutler
Creator
Creator

Alert Text in Email

Hi I have an alert that is triggered once a day.

In the body of the email are some key figures about a production run driven by some set analysis statements.

In the email that goes out to people all these measures are presented on one line and it looks really untidy.

How can I get the three KPI's to show on three separate lines in the email. I've tried various chr()'s, any help gratefully received.

Cheers

Darrell

3 Replies
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Darrell,

If you have separate fields that you are stringing together you should be able to concatenate in chr(10) and chr(13) characters, or just have carriage returns in quotes.

A useful trick I often use when you have values in a data set is using Aggr and Concat:

=Concat(Aggr(Client & ': ' & num(sum(Mileage), '#,##0'), Client), '

')

Note that the closing quotation and bracket being on the next line puts carriage returns into the email.

Hope that helps.

Steve

darrellbutler
Creator
Creator
Author

Steve,

Many thanks for your help - I'm still toiling though !

This is the formula:

='Total Non Conformances on Yesterdays HAV SO:'&num(sum({1<[DoM] = {'$(vYstrday)'}>} NON_CONFORMANCE_COUNT), '#,###') & chr(10) &

'No of tests within target (Shop Order Qual Score):'&num(sum({$<[DoM] = {'$(vYstrday)'}>}IDEAL_COUNT)/ sum({$<[DoM] = {'$(vYstrday)'}>}TOTAL_COUNT), '##%') & chr(10) &

'Date of Manuf'&' '&min({1<[DoM] = {'$(vYstrday)'}>} DoM)

Ideally on the email I want three lines of text with the resultant score alongside, at present it's all one line.

If you've got time I'd appreciate any help you can offer.

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

This expression looks fine.  You could check it over by pasting it into a text box and seeing how it comes out.

You can also do line feeds in string fields, like this:

='Total Non Conformances on Yesterdays HAV SO:'&num(sum({1<[DoM] = {'$(vYstrday)'}>} NON_CONFORMANCE_COUNT), '#,###') & '

No of tests within target (Shop Order Qual Score):'&num(sum({$<[DoM] = {'$(vYstrday)'}>}IDEAL_COUNT)/ sum({$<[DoM] = {'$(vYstrday)'}>}TOTAL_COUNT), '##%') & '

Date of Manuf'&' '&min({1<[DoM] = {'$(vYstrday)'}>} DoM)

This may yield a different result.

It may be that your mail server is stripping out certain characters - can you try sending via a different server?

Another thought is it may be that your mail is being sent in HTML mode, in which case white space (including line feeds) is ignored and replaced with a single space.  You could try inserting HTML into the code, replacing all CHR(10) fields with '<br>'.

Hopefully one of those things will work for you.

- Steve