Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
QlikView has two features which allow it to send alerts and data to the user, using Alerts in the front end or QMC notifications on the Server. Presently Sense lacks these out of the box, but it is possible to implement the same using the free Qlik Web Connectors SMTP Connector.
This application implements the sending of data as an HTML table embedded in an email each time an app is reloaded.
It was produced to go alongside this blog post, which describes the process in detail:
https://www.quickintelligence.co.uk/send-data-from-qlik-load-script/
I hope that you find the application useful. You will find other applications that I have uploaded under my profile on QlikCommunity or on our Downloads page..
Steve
Hi Steve,
Thanks for your reply. The issue was because of vQwcConnectionName and I have solved it. I have one more question, why will the background color of html table not gets reflected in mail ?
Hi @AV1
That's great to hear. I've used this technique to send emails with cell colours and images and all sorts, so it does work sometimes. I have noticed that a lot of the formatting is lost when the emails are sent to Zendesk (the support desk platform we use), so the problem may be down to the client, try sending to a different destination.
The fact that we can't embed double quotes means that the HTML is technically invalid, but most clients do a reasonable job of working without that.
Do you have the colour in the cell definition or in CSS? Whichever it is, try switching to the other.
I'm afraid it's likely to be a bit of trial and error - hope you get it sorted.
Cheers,
Steve
Hi @AV1
We have expanded this technique into a product, which has a table of report definitions and thresholds which is parsed and then emails are sent to users also specified in this table. This has the ability to shade and group cells, and work out totals and text formatting.
The resulting emails can look like this:
The HTML that QWC uses to send this email can be found here:
https://www.quickintelligence.co.uk/qi-notify-example.htm
This has been created from a STORE statement in Sense (hence the slightly odd HTML).
Hopefully that will help.
Steve
Hi
i want to get the two failed table in single mail body is it possible to get it in single mail i am getting two separate mail for this
please help
Thanks
Jaya
Hi @Jaya15
If there is more than one email coming out then I guess you must have a loop in your script?
Instead of the mail statements being inside the loop, move these to the end of the script outside of the loop.
Inside the loop you can keep appending HTML to the table which you store out to a text file.
This way you should be able to send one larger mail, rather than many small ones.
Hope that helps.
Steve
Hi @stevedark
Thanks For the reply
i had tried this but its not working when i putted the call stement after for loop i am getting only one failed table mail second table is not showing in that mail
below is my script:
Thanks
Jaya Sharma
Hi @Jaya15
As well as moving the send statement outside of the loop, you will need to break up the building of the message, so it appends extra rows within the loop. If you only move the send outside of the loop it will only send the last message (not the first).
Something like:
let iErrs = 0;
for n=1 to NoOFRows('FailedTableLog_Data')
call SetCursor('FailedTableLog_Data', n);
if Result = 'Failure' then
// If first error write header
if iErrs = 0 then
let vMsg = '<h5>Dear team... </th></tr>';
end if
let vMsg = vMsg & '<tr><td>....</td></tr>';
let iErrs = iErrs + 1;
end if
next
if iErrs > 0 then
let vMsg = vMsg & '</table><br><br><h5>Thanks...';
call SendStatus(1, ...);
end if
DROP TABLE TablesToBeExtracted
Hope that helps.
Steve