2 Replies Latest reply on Jul 18, 2012 9:00 AM by Kirk_1

    Importing and creating a serialized ID number



      Importing and creating a serialized ID number


      Im importing into Filemaker. For the table im working on, I have the primary key set as a serial number and it increases 1 number with each new record.


      When i import, its removing my serial number.


      I made sure that its not importing anything into the ID field. I have another script that i do this with but with different data. It works each time.


      Any ideas?

        • 1. Re: Importing and creating a serialized ID number

          It seems you are importing into new records, not using import to update existing records.

          If so, it's not removing the serial number, it's simply failing to add one to each new record created by your import.

          When you set up the import records operation, there's one last dialog that pops up just before you start the import or move on to the next script step (If setting up a scripted import records).

          There's a check box in this dialog that enables auto-entry operations. Select this option and your serial numbers will be automatically generated for each new record created by the import. This, however, enables all auto-enter options on all fields in your table. This is not always something that you want to have happen. There is, however, an alternative and it also allows you to "fix" your imported data by adding a serial number so that you do not have to re-import your data just to add the serial number.

          Immediately after import, the newly imported records form the found set. Replace Field Contents can be  used to assign a serial number to your serial number field for every record in your found set and there's a check box that enables it to update the next serial value setting at the same time. If you no longer have your newly imported records as the found set, you can perform a find where you put a lone = in the serial number field to find all records where the serial number field is empty. Then you have your found set back and can use Replace Field Contents to add a serial number.

          • 2. Re: Importing and creating a serialized ID number

            That worked.


            Thank you.


            On this script\layout\table  i only have one function that auto enters, so the check box is a good solution.