Skip to main content

G'day,

My workspace generates several rows of data, then goes through a statistics calculator so I can count the total rows of data. This total row is calculated so that I can email the user a summary of what has been done during the run process.

 

What I am finding is that I am unable to use this fmt_acc.total_count figure unless I connect the Summary output through to the HTMLReportGenerator. When I connect this to the generator it ends up creating an additional row in my report with all NULL values, which is not ideal, so I disconnected it.

unnecessary row in HTML report 

I then use an emailer to send a copy of this HTMLReport, and in my email subject I would like to say "XX Number of Features Found, full list attached", where XX is the fmt_acc.total_count.

 

Unless I connect this summary, the emailer has no access to this data.

 

Can anyone think of a way I can include this fmt_acc.total_count in my emailer, without adding a dummy row in my HTML report?

 

workbench

Yes, you can connect a second HTMLReportGenerator to the Summary output port of the StatisticsCalculator and use that to format a header. With the Custom HTML option in the HTMLReportGenerator you have full control over that content (but you need to know some HTML for that)

Route that to the FeatureWriter as well (same input port) and then you just have to make sure the header comes before the table, so AttributeCreator to create a dummy attribute after each HTMLReportGenerator and then a Sorter.


Yes, you can connect a second HTMLReportGenerator to the Summary output port of the StatisticsCalculator and use that to format a header. With the Custom HTML option in the HTMLReportGenerator you have full control over that content (but you need to know some HTML for that)

Route that to the FeatureWriter as well (same input port) and then you just have to make sure the header comes before the table, so AttributeCreator to create a dummy attribute after each HTMLReportGenerator and then a Sorter.

Hi @Hans van der Maarel​, I appreciate your reply!

I have attempted to implement as you have suggested, but I am missing the link between the HTMLReportGenerator_9 that is connected to the Summary Port, and how this number can be pushed into the emailer subject line. I have been able to add content to the HTML that is saved by the FeatureWriter, but not extract into the email subject.

Have I missed something in my below edit that would enable me to expose that attribute?

Thanks again

image.png


Hi @Hans van der Maarel​, I appreciate your reply!

I have attempted to implement as you have suggested, but I am missing the link between the HTMLReportGenerator_9 that is connected to the Summary Port, and how this number can be pushed into the emailer subject line. I have been able to add content to the HTML that is saved by the FeatureWriter, but not extract into the email subject.

Have I missed something in my below edit that would enable me to expose that attribute?

Thanks again

image.png

The FeatureWriter does not output any of the original attributes on the summary feature (which kinda makes sense). So what you can do is make a connection from the HTMLReportGenerator_9 (or the StatisticsCalculator Summary) to a FeatureMerger (supplier port) and put the FeatureWriter summary port in it as requestor. Then you need to specify join keys but since you only have 1 feature joining 1 other feature you can set it up like this:

imageSo "1" for both requestor and supplier, making it an unconditional merge.


Reply