1 Reply Latest reply on Apr 27, 2009 7:17 AM by Jade

    inserting primary key serial numbers into old data with empty field?

    DonorTracker

      Title

      inserting primary key serial numbers into old data with empty field?

      Post

      I imported a bunch of check_book register data into FMPro 10.  The original data did not have a unique serial number kp field.

       

      How do I get a unique serial number into the old data?  (I don't want to re-import it.)  New records are creating the kp serial OK.

       

      My current settings on the field are thus:

       

      _kp_check_register_id Text    Indexed. Auto—enter Serial. Can't Modify Auto. Always Validate. Required Value, Unique

        • 1. Re: inserting primary key serial numbers into old data with empty field?
          Jade
            

          Hi DonorTracker,

           

          You can replace the serial number in the old records but first you must perform a find to constrain the found set to only the old ones.  Otherwise this will update all records including the new ones.  It is irreversible so make a backup first.

           

          Edit the key field (File>Manage>Database…) and find the next serial value on the Auto-Enter tab.

           

          Select the key field in Browse mode and choose 'Replace Field Contents…' from the Records menu.  Select the 'Replace with Serial Numbers' option and set the Initial Value to the next serial value so that there is no overlap with the existing serial values. Also check the Update serial number in Entry Options to reset the next value in the Options for Field dialog box. Finally click the Replace button