+ Reply to Thread
Results 1 to 5 of 5

Thread: ArcMap 10, Add unique ID field

  1. #1
    jamie finney
    Join Date
    Apr 2010
    Posts
    71
    Points
    2
    Answers Provided
    0


    0

    Default ArcMap 10, Add unique ID field

    How do you add a unique ID field in ArcMap 10?

    in ArcMap 9.x i always made a new ID field and used the field calculator expression "UID + 1" in ArcMap 10 there doesn't appear to be a UID field, seems to have been replaced with "ObjectID" and this won't work to update my field.

    Any ideas? sure there's a better / proper way of doing this.

  2. #2
    Donovan Cameron

    Join Date
    Aug 2010
    Posts
    477
    Points
    40
    Answers Provided
    3


    0

    Default Re: ArcMap 10, Add unique ID field

    I haven't used Arc 10 yet, but could you maybe create a new integer field and make it equal to ObjectID, then use this new field as the reference for your NewField + 1 expression?


  3. #3
    jamie finney
    Join Date
    Apr 2010
    Posts
    71
    Points
    2
    Answers Provided
    0


    0

    Default Re: ArcMap 10, Add unique ID field

    SaultDon, thanks for your reply unfortunatly your idea won't work if i set a new field to = [OBJECTID] it comes up with nothing.

    i used to use FID + 1 (as the first FID always equal to 0)

    UPDATE: this still works with a stand alone shp file as this still has the FID field. If my file is in a geodatabase there is no FID only OBJECTID

  4. #4
    Lance Shipman

    Join Date
    Oct 2009
    Posts
    390
    Points
    113
    Answers Provided
    19


    0

    Default Re: ArcMap 10, Add unique ID field

    Shapefiles include a FID, which starts at 0. Geodadabase tables and feature classes include an OBJECTID, which initially starts at 1. If the first row(s) are deleted it will no longer start at 1. It will always be ordered and unique.

    What flavor of the geodatabase are you using? File Geodatabase, Personal Geodatabase, ArcSDE? If ArcSDE, which RDBMS.

    What version of Windows?
    Lance Shipman
    Geodatabase Product Engineer, File Geodatabase, SQLite
    Esri

  5. #5
    jamie finney
    Join Date
    Apr 2010
    Posts
    71
    Points
    2
    Answers Provided
    0


    0

    Default Re: ArcMap 10, Add unique ID field

    lshipman thanks for your reply, tried this again today with both file and personal geodatabases and it worked fine. Arc must have just been playing up yesterday as my fields kept refusing to update.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts