Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

Hello Everyone,

 

We have a filemaker file that is damaged. When we try to recover it, filemaker suggests we stop using the file and extract the data. We however continued using the file anyway as it is a crucial part of the overall system. At the same time I started creating the file from scratch. The file itself is quite big, more than 100 fields and 800000 records. It's been around for about 10 years therefore the fields have just kept adding. 

 

These are the steps I followed to create the new file ;

 

1. Create a new filemaker file with the same name as the old one.

2. Create all the tables that were in the old file.

3. Create all datasources as in the old file.

4. Sort the old database fields by type and copy over all fields except calculations and summaries.

5. Create all relations from scratch; to be exactly the same as the old file.

6. Copy over all calculations and summaries to new file.

7. Check all look ups to make sure all fields referenced are valid.

8. Go through each layout in the old file and create new layouts in the new file WITH JUST THE LAYOUT NAME (So that scripts can be imported from the old file without losing references to layouts)

9. Copy all scripts from  the old file in to the new one.

10. Copy all value lists from the old file to the new one.

11. Go through all layouts and copy all the layout objects in to the new layouts. 

12. Import all records from the old file.

13. Test buttons and layouts to see if all fields and scripts are correctly referenced.

 

I performed all above steps and I managed to create a fully functional brand new replication of the old corrupted file. 

 

I decided to take the file and test how it runs together with all the other files, I retrieved a back up of the entire solution, replaced the old file with the new one and started checking other files referencing the newly replicated file.

 

The relationship structure shows that the file replicated is correctly referenced as a datasource but the fields matched within the relation are unknown or are incorrect fields. Refer to attached image. 

 

I am confused to as why this is the case, the filenames are exactly the same as the old file. Shouldn't the relations pick this up? I thought perhaps this is due to the order the fields were added to the old one. i.e. the creation orders. I then decided to take the fields off and copy them back in the same creation order as the old file, copy over the new file to a brand new copy of the solution. This made no difference, the external files were still referencing the wrong fields or were unknown. 

 

I am very curious as to why this is, I know very little about the internal structure of filemaker, I am pretty sure filemaker does not assign an unique id to each field. Even if it did, creating the fields in the same creation order should assign the same id as the ones in the older file. Can anyone shed some light on this?

 

I am going to see what the replies are going to be before I put the new file live and rebuild the external relation references, which is going to be a lengthy process.

 

Thank you in advance.

Posted

fields are referenced by their internal IDs, not by their names.  You can see the IDs by using a bit of SQL:

 

Select * from FileMaker_Fields

The 4th column in that data is the internal field ID

 

So when you create fields you have to re-create them so that each field will have its original internal ID.  That means creating dummy fields to fill the gaps for where fields were deleted in the original table.

 

In general, it's not a good idea to copy and paste objects from a corrupted file into a new one.  Especially not layout objects.  There is a risk that you will move over any latent corruption from the old file.

  • Newbies
Posted

Thank You Wim, that's very helpful. You learn something new everyday! I will recreate the objects from scratch for layouts. Thanks again.

This topic is 4170 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.