Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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.
Posted

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.

Posted

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.

This topic is 4790 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.