Skip to main content
Question

FeatureWriter does not give an output if using a function in the file name


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.

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

What version FME do you use?


  • Author
  • September 1, 2023
nielsgerrits wrote:

What version FME do you use?

2021.2


DanAtSafe
Safer
Forum|alt.badge.img+18
  • Safer
  • September 1, 2023

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.

 


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