Question

Counter - Get Count Start variable from StatisticsCalculator


Badge +6

Howdy!

Seems like this is an easy one but I couldn't find where this solution might be found in the Knowledge Base... my brains just not clicking today!

My Goal: Use the max value output from StatisticsCalculator, add one to get the next sequential value, use that value as the start value for a new Counter transformer. Background: Early in my FME workflow I use the Counter to tag each street intersection point feature/record with a unique ID, this gets stored in a field named "FME_CountID". Later in the workflow, I need to add new street intersection point features/records to those earlier records. Issue to resolve: For those new intersection point records I need to pick up the existing FME_CountID record numbering where it left off.

 

Thank you in advance!


2 replies

Badge +22

If you use the same counter name as the previous counter, and have it set to global, it should just pick up where it left off.

 

 

EDIT: you just need to make sure that no features arrive at the second counter before they are all through the first counter. A featureHolder can handle that if there are no blocking transformers upstream.

Badge +6

If you use the same counter name as the previous counter, and have it set to global, it should just pick up where it left off.

 

 

EDIT: you just need to make sure that no features arrive at the second counter before they are all through the first counter. A featureHolder can handle that if there are no blocking transformers upstream.

Thank you!

 

 

Reply