Modal Windows/Revert Record

Version 2
    Technique
    Compatibility
    Creator
    iOS, Mac OS X, Windows
    Daniel Shanahan
    FMP 12
    New Leaf Data, LLC
    Web: No
    File Type: ZIP
    Server: Yes
    FileSize: ~ .24 megabytes
    http://www.newleafdata.com

    Description

    One of the many great new features in FileMaker Pro 12 is modal windows. In this file I demonstrate how to use a modal window to add and edit a record. The same layout is used for adding and editing a record and the technique requires two scripts. There is a caveat to this technique and this is the real purpose of the sample file. The second script uses the Revert Record script step which will delete a newly created record as well as undo any changes to an existing record. However, if the user commits the record then the record cannot be reverted. Fortunately, this is easy to solve: add an object to the modal window. Make the object a button and do not show pointer finger (show arrow instead). Put the newly created button object on the modal window. Remove fill and line and send the button object to the back. Now, if a user inadvertenly clicks outside of a field or a button, they will not commit the record.

     


    Developer's Notes

     

    Click the Add Task button below the Tasks portal in the attached sample file to see this technique at work.

     

    See this screencast for visual support of this technique:

     

    http://youtu.be/QTCqzysiQWA

     

     


    FileMaker Inc. provides this content on an “As Is” basis, without any warranty, and subject to the terms of the FileMaker Technical Network Agreement. FileMaker makes no representations and is not liable for any content or related information. You may use the content as part of your own solutions and for your customers, but you may not otherwise publicly distribute any content that you did not submit. ©2009-2012 FileMaker, Inc. All Rights Reserved. FileMaker is a trademark of FileMaker, Inc. registered in the U.S. and other countries.