gephry Posted September 8, 2006 Share Posted September 8, 2006 Had a script in a database in FM6 that upon opening one file (Menu), it would close another file if file #2 (Contacts) were opened. The script is (with FM8 formatting) If( PatternCount( DatabaseNames; "Contacts" ) > 0 ) { Close[ Contacts.fp7 ] } Problem is, Contacts is open and when Menu opens, it does not close Contacts. I see it under Window > Show Window -> (Contacts) Actually, wait, it seems as if the script IS working (I stuck a popup in the If statement and it certainly is triggering the Close[] function). Are the files that are in parenthesis "differently open" than the ones not in parenthesis? If so, is there a way to close those parenthesis-ed files so people cannot access them? Thanks! Link to comment Share on other sites More sharing options...
John Mark Osborne Posted September 8, 2006 Share Posted September 8, 2006 Is it possible a relationship in your Menu file is opening the Contacts file again after it was closed? It could be a related field or portal on the layout or maybe something in the open script. This would explain why it had the parenthesis around the file name since it was opened by FileMaker to do something. Link to comment Share on other sites More sharing options...
gephry Posted September 8, 2006 Author Share Posted September 8, 2006 Hmm, that makes sense, yes. Hm. Thing is...it worked correctly in FM6 (i.e. it didn't open up files as references). I thought I had the close database order down correctly (I actually am closing multiple databases, not just Contacts). So a mis-ordering could definitely do it. I'll give it a whirl. Thanks! Link to comment Share on other sites More sharing options...
T-Square Posted September 8, 2006 Share Posted September 8, 2006 I believe that if you open a layout that has any connection on the Relationship Graph to the table in the other file, it will open that file. Link to comment Share on other sites More sharing options...
John Mark Osborne Posted September 20, 2006 Share Posted September 20, 2006 Yes, this is correct. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6591 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