Skip to main content
Solved

Emailer hyperlink from $(DestDataset)


Hi,

I'm fairly new to FME so please bear with me.

I have setup a workbench that that creates a simple HTML report (few stats from a MapInfo Tab) for a colleague.

I am using "@DateTimeFormat(@DateTimeNow(),%B %d %Y" as my fanout parameter to name the html file by the date it was created each time the work bench is run. My emailer is setup with the body text as "Click <a href="$(DestDataset_HTML)">here</a>". Before I added the fanout option to name each output my hyperlink would link directly to the output file but since adding this it just links to the output folder. Can anyone tell me why that is and how I might be able to get around it?

Cheers!

Phil

Best answer by takashi

Hi @philipjohnbarlo, once you set Dataset Fanout Expression, the destination dataset parameter $(DestDataset_HTML) would store the parent directory path, so you cannot retrieve destination file path from the parameter.

A possible workaround is, replace the HTML writer with a FeatureWriter transformer, connect the Emailer to the Summary port. You can then set a string expression to the Dataset parameter in the FeatureWriter and also refer the destination dataset (file path) through the "dataset" attribute contained by the output feature. Something like this.

View original

takashi
Contributor
Forum|alt.badge.img+17
  • Contributor
  • May 19, 2018

Hi @philipjohnbarlo, once you set Dataset Fanout Expression, the destination dataset parameter $(DestDataset_HTML) would store the parent directory path, so you cannot retrieve destination file path from the parameter.

A possible workaround is, replace the HTML writer with a FeatureWriter transformer, connect the Emailer to the Summary port. You can then set a string expression to the Dataset parameter in the FeatureWriter and also refer the destination dataset (file path) through the "dataset" attribute contained by the output feature. Something like this.


Thanks @takashi, I'll give that a go.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings