VizAlerts
VizAlerts copied to clipboard
Allow use of VIZ_CSV in the Body field of an email
A good idea emailed to me from Basile Verheecke: If VIZ_CSV() is encountered in the Email Body field, treat it as an HTML table. This allows for a lot of great use cases:
-
To build a VizAlert with a list of items, you must currently use the Consolidate field to tell it to consolidate the multiple lines of CSV data you get from your viz. Then ya gotta worry about sorting, and such. It works well, but it is a bit confusing. With this feature, one could simply build another table viz and drop VIZ_CSV(thisworkbook\tableviz) into the body. Presto, a list!
-
Standardized footers with formatting might be able to be added without maintaining them across all workbooks. Just have someone publish up a workbook with a one-column, one-row text table with the HTML formatting in question.
Some things to think about:
How would formatting be handled? Maybe by adding some arguments to VIZ_CSV() that only apply when it's found in the body? Maybe something like VIZ_CSV(thisworkbook\tableviz|border=0|noheader)? Or, perhaps we just leave fancier formatting like that to using the Consolidate method?
Currently it is not possible to have a content ref inside a content ref. Primarily because none of the content being rendered is of a type that would make sense to. But taking the example of the custom footer used across an entire company, one could do the following:
Trigger viz: "report content, thanks for reading! <br><br>Matt Coles<br>VIZ_CSV(FooterWorkbook\Footer)"
FooterWorkbook\Footer: <font face='script'>Fancy Pants Publishing, Inc</font><br>VIZ_PNG(FooterWorkbook\Logo)"
FooterWorkbook\Logo: (dashboard with logo image)
So in that case, it would be interesting to render the CSV, search it for content refs, find the logo, render that to PNG, then embed the whole kit and caboodle into the main email.
That's probably way to complicated for where we're currently at, but it's fun to think about.