Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

script to open and close relational files

Featured Replies

My first relational database - three files - students, colleges and applications. I was trying to create a opening screen layout with buttons that the guidance counselors could use to get to either the students file or the applications file. I then tried to write a script to open and also one to close the files and was not successful. Now when I try to close the file, I get an error message. How do I start all over - it keeps telling me script has not been found or has been deleted....The script is still there, it's just not written correctly. Please help - this is probably a simple thing, but since I am so new - it seems imipossible to me. thanks

FileMaker Version: 6

Platform: Windows 2000

Easiest: make sure all the databases are in the same folder on the computer. For each Open script step, click the Specify File button to redefine the file, make sure you're in the right folder. Obviously, make sure you have two Opens, one for each file.

The Close script must first close the two files that do not contain the Close script. Make sure any data updates, etc. are done first, otherwise Filemaker may need to re-open a database. You can redefine Close script steps like the Opens, click on Specify File.

A handy feature is to use FileMaker's Document preferences to specify Opening and Closing scripts. This automates all the action.

The script not found sounds like the buttons are not properly defined. Click on a button, then go to Format>Button.. and make sure the script is displayed in the popup menu (I assume you must have set them up right at some point, which means the left column is Perform Script).

Does this help?

  • 4 weeks later...
  • Author

Yes - thank you - but now what I have done is set up close scripts for each file and have specified a button for the user to click - however, if the user clicks the close "X" on the window instead of the button on the layout, some of the files still stay open. I was trying to make it "user-proof" and can't figure out how to get a window to close - I have added a closing script to the document preferences. But I'm still doing something wrong. Although it's better than before.

I wasn't quite sure what you meant "The Close script must first close the two files that do not contain the Close script." Thanks.

The close script should look like this:

Close (file A)

Close (file :

etc...

Close()

The last step closes the current file.

An even "cleaner" method is to first test that the target files are open:

If [ Position(DatabaseNames, "file A", 1, 1) ]

. Close (file A)

End If

etc.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.