Whenever you move FileMaker code from one file to another, you need to do things in the right order. If you follow this checklist everything will work correctly when it is in the new file.  Some of this stuff you can copy and paste or import. The rest you will have to manually copy. It’s not fun, but if you need to rebuild a bad file, merge two files together, or just get a code chunk from one file to another, following these steps can get the job done.

  1. Custom Functions –  Copy and Paste or Import
  2. Tables – Copy and Paste or Import
  3. Graph – Manual Fix. Make sure relationships and names are set up correctly
  4. Adjust Fields –  Any fields that needed relationships will need to be adjusted. One way to do this is to delete all the fields and re-copy and paste the fields from the old file to the new.  That will break relationships, but those might be easier to fix than all of the broken calcs.
  5. Layouts – Manual.  make the layouts with the correct names. Skip content for now. That comes later
  6. Scripts – Copy and Paste or Import
  7. Value Lists – Manual
  8. Themes – Import ( Technically these can go any time before step 9)
  9. Layout Contents – Copy and Paste content, manually set sizes and parts.
  10. Layout Based Script Triggers – Manual
  11. Security ie Accounts and Privilege Sets – Manual
  12. Custom Menus – Manual
  13. File Options – Default Passwords and Window Based Script Triggers

Yes, this is a tedious, time-consuming, fragile process.  But it is the best we have. In the case of smaller code chunks that have been designed with this in mind, like modularfilemaker.org modules, it can be made to work.