Jump to content

Serial number issue


This topic is 5008 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I'm exporting a table and need the uniquely identifier number. On my table I see two Ids, one serial and the other user-generated. However the serial is missing for some records(DO HAVE DATA). I need these unique numbers to be able to update my the tables in the new database that I'm exporting all my data to. How does file maker identify records and how do I export those ids.

Any help is clearly appreciated.

Thanks.

Link to comment
Share on other sites

Hi Krea:

What probably happened is that the serial number field you can see was created after some records already existed, and thus those records don't have serial numbers. I will assume that your serial number is being used as a primary key for relationships, meaning you cannot simply replace all the numbers with new numbers. However, if that is NOT the case, you can write a simple looping script to set new serial numbers.

Although FileMaker does have an internal record ID, it's not available to you, so you will need to assign the missing serial numbers yourself. Depending on the number of records, you can either do that manually or via a scripted process. If you script it, you could just find a 'hole' in your numbering (or, if your numbering begins with 1 and goes up from there, create a 'hole' by changing what the next value for the field will be, increasing it by enough to give you values to assign to your existing unserialized records.

So, if you have 1000 records, and 900 of them have serials going from 1 to 900, you would set the next value of your serial field to 1001, then assign (via a looping n=n+1 and SetField script) the numbers 901-1000 to the unserialized records.

HTH

Stanley

Link to comment
Share on other sites

  • Newbies

That's a wealth of information!! but does file maker provide an API to let me interact with this serial fields? I'm working in PHP and my script needs to perform updates. So if I should change the fields from a PHP script(or which one?) how do I programatically connect to file maker to make sure the serial are real serial before I finish the job on my end.

Thank you. Again that was very informative.

Link to comment
Share on other sites

This topic is 5008 days old. Please don't post here. Open a new topic instead.

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.