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.

OnRecordExit?

Featured Replies

Anyone figured out how to do an OnRecordExit script trigger? Not on Commit or Validate, but Exit.

Users want a check that fields have been entered before leaving the record. Commit and Validate run too frequently.

Thanks,

David

Hmmm... is there a record exit? Fields can be exited. Dunno about records.

  • Author

What else do we call it when you leave a record?

Obviously, there isn't one natively now, but I'm hoping for a workaround.

Maybe FMP12? In FMP10, one of the triggers was OnLayoutLoad. No way to trigger when leaving a layout. Then in FMP11, they introduced OnLayoutExit, and had to change the name of the other trigger to OnLayoutEnter to match. Hopefully the same will happen.

I'm hoping for a workaround.

I suppose something could be worked out by using OnRecordLoad, with a variable storing the "previous" record. However, I'd suggest dealing with this part instead:

Commit and Validate run too frequently.

What else do we call it when you leave a record?

If the record hasn't been modified then there is nothing to check or trap for because nothing has happened. If the record has been modified then the field validation needs to happen, then the record commits.

Otherwise, mee too for comment's post above. Except that once the onRecordLoad script has run then we're no longer on the previous record.

Except that once the onRecordLoad script has run then we're no longer on the previous record.

True, but if part of the script is storing the current record's ID in a variable, then the previous record is still accessible. OTOH, there are all sorts of eventualities to handle here, e.g. loading a new record by omitting/deleting the current one, going to another layout, etc. - so this is not something I'd look forward to implement.

Ultimately, if a field should not be empty, it should be validated as such.

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.