Jump to content
Server Maintenance This Week. ×

Record ID number


Recommended Posts

I have several FM databases for a variety of reasons, and all of them have been in use for many years.  I recently created a Record ID field in a few of the DBs to have another way of locating some of the data.  But apparently, a record ID number is created when a new record is created.  The existing records do not show this ID number.  It would seem that each record in a FM db has a unique ID number, yes?  Is there any way to populate this field with an existing ID number?

Link to comment
Share on other sites

Every record has a unique ID number which can be accessed using the Get(RecordID) function.

You don't tell us how your field is defined. I am guessing it's a Number field, auto-entering a calculated value? If so, you will need to populate the existing records yourself: 

  1. Show all records;
  2. Click inside the ID field;
  3. Select: Records > Replace Field Contents… > Replace with calculated result = Get(RecordID)

(It is recommended to have a backup before using Replace Field Contents.)

Alternatively, you could make it a calculation field (preferably stored).


You also didn't tell us exactly how this is going to be used. You should be aware that if you ever migrate your data to another file, you may end up with duplicate values due to deleted records. If you want a permanent unique identifier of a record, use either a serial number or a UUID.

 

Edited by comment
Link to comment
Share on other sites

Yes, I failed to mention that I did format that field as a Number field with Get(RecordID), but I haven't applied a Replace Field Contents, so good info there.

Your idea of a serial number or UUID is well taken; food for thought.

Yes, I am a backup fanatic, so…

Thanks very much for your thoughts.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.