2 Replies Latest reply on Jun 3, 2011 10:27 AM by LaRetta_1

    populate field with unique ID



      populate field with unique ID


      I have an existing table with 800+ records.  I created a new field in the table and now I want to populate that field with a unique ID.  Is there a calculation I can run that will automattically go through each record of the table and give it a unique ID, incrementing by 1?


      Jeff G

        • 1. Re: populate field with unique ID

          Use Replace Field Contents from the Records menu. It has a serial number option so you can use this once to enter serial numbers into all the records in your found set. If this field is currently defined as an auto-entered serial number, there's even an option for updating the next serial value option in the same operation.

          • 2. Re: populate field with unique ID

            Phil covered it well but I might add ... be sure to show all records first since you are populating the new primary key and define the uniqueID in field definitions to serial first. 

            Then when you run ReplaceFieldContents() it will allow you to update the 'next serial value'.  If you don't have this established in auto-enter first, you will not be offered the 'update auto-enter serial' and you will then have to manually set the uniqueID's next serial number in field definitions.