Skip to main content

I have used the FeatureWriter to save a csv with a dynamic filename of "Name_@Left(@DateTimeNow(),8)" before passing on the features to be used by the Emailer transformer. However I only get a result from the Summary port and nothing in the output port.

 

If I change the file name so that it doesn't include functions and uses an attribute instead (creating a new attribute to handle the date function before the featurewriter) then I see features in the output port.

What version FME do you use?


What version FME do you use?

2021.2


Hi @envtom​ It's not possible using a function to make the port name dynamic like the writer itself.  However, you could use an attribute value in the CSV file name which will work on the port as well. e.g. with an AttributeManager set 

_today to @Left(@DateTimeNow(),8)

then in the FeatureWriter set the CSV File Name to

Name_@Value(_today)

The output port will appear the same but the feature will come out of it so that it can trigger the  Emailer.

 


Reply