October 12, 201114 yr 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
October 12, 201114 yr 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.
October 13, 201114 yr 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.
October 13, 201114 yr 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.
October 13, 201114 yr 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