Newbies krea Posted August 31, 2010 Newbies Posted August 31, 2010 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.
stanley Posted September 1, 2010 Posted September 1, 2010 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
Newbies krea Posted September 1, 2010 Author Newbies Posted September 1, 2010 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.
Recommended Posts
This topic is 5195 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 accountSign in
Already have an account? Sign in here.
Sign In Now