Skip to main content
Solved

How can I restart a row counter in FME at the beginning of each year?

  • September 22, 2025
  • 2 replies
  • 51 views

farzanehahmadi
Contributor
Forum|alt.badge.img+1

Hello everyone

How can I restart a row counter in FME at the beginning of each year?

I have a dataset with a year attribute (e.g., 2025, 2026). I want to generate a rowid that starts at 1 for each new year and increments sequentially.

Example:

  • For 2025 → rowid should be 1, 2, 3 …

  • For 2026 → rowid should reset back to 1, 2, 3 …

I then want to concatenate the last two digits of the year with the padded rowid to create a WorkOrderID like:

  • 250001, 250002 …

  • 260001, 260002 …

Which FME transformers or workflow should I use to reset the counter per year?

Best answer by ebygomm

You can do this with a counter, just set the Count Domain to the attribute containing the year

Then something like this to create your work order id

 

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.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+45
  • Influencer
  • Best Answer
  • September 22, 2025

You can do this with a counter, just set the Count Domain to the attribute containing the year

Then something like this to create your work order id

 


farzanehahmadi
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • September 22, 2025

Hi ​@ebygomm , thank you so much, it worked.