Skip to main content
Solved

Emailer hyperlink from $(DestDataset)

  • May 18, 2018
  • 2 replies
  • 115 views

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • 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.