Skip to main content
Solved

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

  • August 8, 2019
  • 4 replies
  • 14 views

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)

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.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • 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
  • 3 replies
  • 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)

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+44
  • Influencer
  • 3427 replies
  • 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)

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


  • Author
  • 3 replies
  • August 8, 2019

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

Ah I see, that worked nicely!

 

Thanks!