pietschker Posted January 9, 2005 Posted January 9, 2005 Hello all, again a q. that may help me understand the details of FP7 databases. I post it in this forum because I am puzzled in the context of building a SM-designed solution, though it might as well belong to the "Security" forum. If the q. is dumb, well, maybe I am. I look for a detailed documentation of what "referencing a file" means versus "opening a file". My own observations as of now are: 1. When I open a FP7 file that has a reference to another FP7 file, the referenced file appears in the "windows" menu in parentheses; the "on open" script of the referenced file is *not* run. 2. When I later access that file that requires an "open" file (create a record, execute a script etc., parentheses in "windows" menu vanish) the "on open" script is still not run. Why is this? Is this a way to circumvent the "on open" script and if so, is this intended? 3. If I explicitly open the file via a script step the "on open" script *is* run. 4. Consequently, would it be best to really open all the files that I need to access (even if I only need to read some globals from them, for which a reference would suffice)? At least this seems to be the only way to make sure of the required user access (via a re-login script), because I have no idea how to handle access in "referenced-only" files. Anyone who can throw some enlightenment to me? Grateful for anything,
Lee Smith Posted January 9, 2005 Posted January 9, 2005 Hi Lutz, I hope I'm understanding your question, or questions. If not, maybe this will help you get to the answer. Also, I don't have v7, so some things may have changed, and this is off of the top of my head. FileMaker opens Related Files: 1). When your current layout of your current file needs to display the related data. 2). If you force it open using an opening Script. 3). When you click on it in the Window (duh). 4). Through the GTRR (Go To Related Record) Button, or Script Step 5). Through the Script Step, "Open File". There are probably more, but this should give the picture. You might want to make a two file demo, and play with some of this to get a better feel for how these work. Also, a hidden file, in parentheses, is really open, it is just hidden from view and you won't see it by collapsing the open window(s). HTH, or at least stimulates the process. Lee
pietschker Posted January 10, 2005 Author Posted January 10, 2005 Lee, thanks for giving me your thoughts on this. However, I think FP7 is the first version that makes (or seems to make) a distinction between "just a reference" and "open". I did a 2-file trial. The thing that puzzles me most is that the "on open" script is not run in some cases. I agree that in a OS-technical sense a referenced file is "open", otherwise I could not read the global values from it, but "open" in the FP7 sense should mean that the "on open" script runs, and it does *not* if I just reference the file. Meanwhile I decided to explicitly open (via a script step in the initial DB file) *all* the files that belong to the DB. In this case I know exactly what happens, and I am sure the "on open" and re-login scripts are actually run.
Ender Posted January 10, 2005 Posted January 10, 2005 Look at the FileMaker 7 Foundations and Migration Methodologies tech brief on FileMaker's website for a description of how the behavior of opening and closing scripts has changed in FM7.
pietschker Posted January 12, 2005 Author Posted January 12, 2005 Ender, thanks for the hint. It answers my q. completely. I thought I read the important parts of this doc, but it amazes me time and again with what I missed on the last reading. I promise I will take a deeper look into it next time before asking the forum.
Recommended Posts
This topic is 7274 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