September 8, 200619 yr 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!
September 8, 200619 yr 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.
September 8, 200619 yr Author 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!
September 8, 200619 yr 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.
Create an account or sign in to comment