Skip to main content
Solved

Create a unique ID


Forum|alt.badge.img+2

I am bringing in an excel table and then adding some different attributes to it and writing it out to a geodatabase. I need to create a unique ID when writing it out to the geodatabase. I have brought in the original table and determined what the largest ID number is. I can't figure out though how to add it to the workspace without each row getting the same ID number.

Best answer by dustin

It would be similar workflow, but only table 1 would be fed into the StatisticsCalculator. The max value would then be passed via FeatureMerger to table 2 for processing those IDs.image

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

4 replies

dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • May 26, 2022

So you want the new Unique IDs in the geodatabase to pick up where the excel IDs ended? If so, I would feed the excel features into a StatisticsCalculator, and specify you want to calculate the max value on the Unique ID field. After that, connect the Complete port to a Counter with Count Start parameter set to (id.max)+1 in the Arithmetic Editor.


Forum|alt.badge.img+2
  • Author
  • May 26, 2022

No, excel (table 1) doesn't have the unique ID. The unique ID is coming from another table (table 2). So I find the largest number from table 2 and pass it on to table 1. And then I want it to increment from there.


dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • Best Answer
  • May 26, 2022

It would be similar workflow, but only table 1 would be fed into the StatisticsCalculator. The max value would then be passed via FeatureMerger to table 2 for processing those IDs.image


Forum|alt.badge.img+2
  • Author
  • May 26, 2022

Thanks ddbrocato! That worked perfectly.


Reply


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