Jump to content

Close Databasenames


This topic is 6450 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

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

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

  • 2 weeks later...

This topic is 6450 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.