David Jondreau Posted October 12, 2011 Posted October 12, 2011 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
Vaughan Posted October 12, 2011 Posted October 12, 2011 Hmmm... is there a record exit? Fields can be exited. Dunno about records.
David Jondreau Posted October 12, 2011 Author Posted October 12, 2011 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.
comment Posted October 13, 2011 Posted October 13, 2011 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.
Vaughan Posted October 13, 2011 Posted October 13, 2011 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.
comment Posted October 13, 2011 Posted October 13, 2011 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.
Recommended Posts
This topic is 5063 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 accountSign in
Already have an account? Sign in here.
Sign In Now