Skip to main content
Solved

How do I count the number of features and included in file name


I'm completing a government return which will need to be sent daily and they require the file to be named as below:

"

File naming:

CAZ-yyyy-mm-dd-XXXX-#.csv

where:

yyyy-mm-dd represents the date the file was generated

XXXX is the agreed identifier for each Licensing Authority (to be confirmed)

# is the total number of records included in the file.

"

The date is easy enough to solve, but I'm hitting a brick wall trying to insert the feature count into the file path. So far I've got:

CAZ-@DateTimeFormat(@DateTimeNow(),%Y-%m-%d)-XXXX-#

Could anyone help with the #?

Best answer by ebygomm

You can use a Statistics Calculator to count the number of features - the total will be added to all features coming out the complete port and you can then this as part of your fanout

 

e.g. CAZ-@DateTimeFormat(@DateTimeNow(),%Y-%m-%d)-XXXX-@Value(total_count)

View original
Did this help you find an answer to your question?

4 replies

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • Best Answer
  • August 8, 2019

You can use a Statistics Calculator to count the number of features - the total will be added to all features coming out the complete port and you can then this as part of your fanout

 

e.g. CAZ-@DateTimeFormat(@DateTimeNow(),%Y-%m-%d)-XXXX-@Value(total_count)


  • Author
  • August 8, 2019
ebygomm wrote:

You can use a Statistics Calculator to count the number of features - the total will be added to all features coming out the complete port and you can then this as part of your fanout

 

e.g. CAZ-@DateTimeFormat(@DateTimeNow(),%Y-%m-%d)-XXXX-@Value(total_count)

Thanks but, I don't want the file to fanout, just a single file with the total features in the filename


ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • August 8, 2019
ebygomm wrote:

You can use a Statistics Calculator to count the number of features - the total will be added to all features coming out the complete port and you can then this as part of your fanout

 

e.g. CAZ-@DateTimeFormat(@DateTimeNow(),%Y-%m-%d)-XXXX-@Value(total_count)

It won't actually fanout, because all the features will have the same value


  • Author
  • August 8, 2019
ebygomm wrote:

It won't actually fanout, because all the features will have the same value

Ah I see, that worked nicely!

 

Thanks!


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