Skip to main content
Solved

Create a unique ID

  • May 26, 2022
  • 4 replies
  • 536 views

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

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

dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 627 replies
  • 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
  • 32 replies
  • 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+31
  • Influencer
  • 627 replies
  • 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
  • 32 replies
  • May 26, 2022

Thanks ddbrocato! That worked perfectly.