Skip to main content
Solved

Create unique id by value

  • November 27, 2025
  • 2 replies
  • 30 views

scootercat_nl
Contributor
Forum|alt.badge.img+6

I have a column containing values ​​(contains 1 or more sorted names) that are both unique and duplicate.

 

Now I want to assign a unique number to each value.

 

This means that the values ​​that are the same should also have the same unique number.

 

How can I handle this within FME?

 

Thanks in advance!

Best answer by s.jager

Not tested, and off the top of my head (currently on my phone) but something like this: Sorter on the values, duplicatefilter, counter on the unique values, sort the duplicates and the unique values together again on the values, then an attribute creator or manager, in which you set adjacent feature handling. Using a conditional, if the id is empty, copy the id from the previous feature into that id (maybe checking for identical values as well).

I’ve used a similar method before processing GPS points, and it worked quite well.

2 replies

s.jager
Influencer
Forum|alt.badge.img+22
  • Influencer
  • Best Answer
  • November 27, 2025

Not tested, and off the top of my head (currently on my phone) but something like this: Sorter on the values, duplicatefilter, counter on the unique values, sort the duplicates and the unique values together again on the values, then an attribute creator or manager, in which you set adjacent feature handling. Using a conditional, if the id is empty, copy the id from the previous feature into that id (maybe checking for identical values as well).

I’ve used a similar method before processing GPS points, and it worked quite well.


scootercat_nl
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • November 27, 2025

DuplicateFilter! Yes, this gave me the right push towards the solution. Thanks!