1 Reply Latest reply on May 29, 2017 4:45 PM by philmodjunk

    Exit layout\application trigger (how to exit filemaker)

    dangelsaurus

      This should be a simple one, but I can't figure it out. 


      Essentially if someone creates clicks new record (and that record has values which are required), and then immediately click File->Exit, they are presented with the "...you must enter a value..." error.  The only way to exit the program is to delete the "new" record.  This seems counter intuitive.

       

      I've tried to set a trigger on OnLayoutExit which would revert the record and allow them to exit, but the OnRecordCommit is called first, and I can't figure out how to tell (from within a script) what function the user is trying to accomplish.  what I would like is something inside of OnRecordCommit that says "Oh this person is trying to exit the program, this is allowed so I'll revert the record"

       

      I know this sounds dumb, but how do you let the user exit FileMaker with an uncommitted record (understanding that you'll lose the changes)

        • 1. Re: Exit layout\application trigger (how to exit filemaker)
          philmodjunk

          Revert the record before exiting/closing the file.

           

          FileMaker always assumes that you want to save the data unless you explicitly do otherwise, such as reverting the new record to make it go away.

           

          In some cases, it works better to have the user fill out global fields and only create a new record via a script when they click a "save button". then closing the window/exiting the layout/closing the file will not trip this issue.