That's an interesting question because I have just encountered a similar problem which I think is caused by the same process.
If it is a blank layout, and therefore there are no fields on the layout, nor any other object that will force the related files to open as hidden files, I would have expected that related files would not be opened, hidden or otherwise, until something triggered the opening such as a related field or a script trigger on the layout.
The problem I am experiencing is between two files. File One is an interface file which upon opening displays a layout with only graphic objects on it. These objects are defined as buttons to open other files. This file also has a number of external data sources as well as TOC's to other files including File Two.
File Two does not visibly open until the required button is clicked nor does it open as hidden.
If File Two is closed after having been opened, it reopens as hidden. This behaviour has only started since I added the relationships to File One together with portals and related fields in File Two on a layout (not current) in File One.
Note: this behaviour occurs whether opening the files using FileMaker v8.0 or FileMaker v11.0 and on a Mac.
I'm most interested to hear more.
Hi Andrew and Linda,
When a file is opened, FileMaker instantiates the join cache. To do this, it walks the Relationships Graph, and in so doing, is apt to open External Data Sources that are referenced (ie have TOs placed) on the Graph of the file you're opening.
So if you don't want an external file to open when your first file opens, you may need to ensure that the graph doesn't have any TOs pointing to the external file.
Simlarly, there are cases when a script loads for execution where references (to fields, and also to external data sources) will be validated (pre-flight), so an external file may open before the scipt step addressing it is reached. To solve that, you may want to put the step that addresses the external file into a sub-script to ensure it won't load until you're ready to run it.
In some cases, given all of the above, it's best to use a separate "starter" file (that doesn't require graph references to any of the other files) to manage the prep work and then bring the other files up at the appropriate point.
Hope that gives you both enough pointers to pick a path through to the outcomes you're looking for.
R J Cologon, Ph.D.
FileMaker Certified Developer
Author, FileMaker Pro 10 Bible
NightWing Enterprises, Melbourne, Australia
Hi Ray and Linda,
Thanks for posting - I created this during the beta testing in September and didn't get any replies so it's great to see my dormant topic getting some activity after 2 months
Ray - I'm working on a solution with 29 files. When I open the main file using FileMaker Pro Advanced it opens 9 files in total which is what I expect based on the startup script, opening layout etc. There are TOs on the graph of this main file to all 29 files - if I open the graph it then opens all 29 files as expected (I'm checking using the FileMaker Server Admin Console to see how many files I have open which also corresponds to the contents of the Window menu). You mentioned that FileMaker "opens any External Data Sources that are referenced (ie have TOs placed) on the Graph of the file you're opening" - I'm not seeing that in this case.
However when I open my interface file that I've created for use with FileMaker Go it definitely opens all External Data Sources that are referenced on the Graph.