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.

Shutdown script problem

Featured Replies

I have an application where I want to do some processing when closing the file, but it appears that when I Quit FileMaker, by the time that the script gets invoked that only one window remains open. All other windows have been closed. Is there any way to prevent this?

A file's shutdown scripts is run when the *last* window of the file is closed.

What processing are you trying to do?

  • Author

The application was designed with a Shutdown button. I developed a script for that which checked for outstanding (uncommitted) windows by means of some global "status" fields and prompted the user to return to any windows with uncommitted updates. This script worked fine, but if the use quit the application the same script didn't work, so I needed to understand what was happening.

I presume (hope) that it doesn't close windows with uncommitted changes. In which case, I just need to check for open windows.

Edited additional notes:

I hadn't tested this above presumption when I wrote this, but it appears that it closes the windows without commiting the changes. How can I inform the user that there was an open window with unsaved changes? and allow them to return to that window to save them? This is what the script which is invoked by the Shutdown button does.

Edited by Guest

  • Author

I have developed a workaround ... perhaps not elegant but it appears to work.

I added a mandatory field to each database, which if empty generates an error messages asking the user to save the outstanding changes. Then in the various scripts that start an update, I set this field to Null. When the Save Changes process completes, the field is set to non-null.

I'd still be interested in a better solution (if such exists.)

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.