1 Reply Latest reply on Mar 11, 2013 8:09 PM by philmodjunk

    Script/Button to clear out file back to original, Revert

    RickyStrom

      Title

      Script/Button to clear out file back to original, Revert

      Post

            

           I have made a page that I'm using to track certain data, but I want a button that will empty all the fields I added info to and bring it back to the original way it was. I tried revert record but that just clears the last field, and doesn't revert the whole file back to original. Ideas? Thanks

            

            

            

        • 1. Re: Script/Button to clear out file back to original, Revert
          philmodjunk

               Revert record reverts the record back to what was there prior to the latest record commit. That might revert a single field or several felds.

               To be sure to be able to revert your data, you'll need to design your layout so that the user cannot commit the record once it has been opened for editing.

               You can go to layout setup... and clear the automatic save check box. This next step works in FileMaker Pro but I am unsure that it works in FM GO: You can over the entire layout with a webviewer so that it intercepts any clicks/taps that would otherwise commit the record. (WIth auto-save disabled, this triggers a dialog asking if you want to save.)

               The other option is to use a set of fields with global storage. You load the fields with data from a record to start, but then only copy the data back to the original record if "save" is clicked/tapped to perform a script that transfers the data back into the original fields of the original record.