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.

Run script by window closing without button?

Featured Replies

Hello everyone,

Is there a way to run a script by closing the active window with the "x" box on top right of window? I created a button to Validate my record but I don't want people to be able to just hit the "x" and not run the script.

Also, does any one have an example or link on how to auto create a record with a serial number, but if record is not "saved", delete that record and reset the serial pattern. My serial numbers get turned into a alpha code that represents an important inventory marker for us.

Thanks in advance to any help.

1) Yes, but you need to be able to create custom menus, a feature only available in the Developer version.

2) I would recommend having two serial numbers. One would be the auto enter used by Filemaker to relate records. Users never need see that number. The other would be the one that meets your business rules.

That second number can be serial without interuption based on a couple methods. You could script new record creation, in the script you can grab the last record's id number and add one to that.

Another way would be via a relationship. Create a Cartesian self-join and for Number have it auto enter Max(SelfJoin::Number) +1.

  • Author

Thanks David,

I'm going to try some of those techniques. Sounds easy enough. Will repost with any new questions.

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.