Display Dialog Box on Delete Text Block

Version 2

     

    Script

     

    Compatibility
    Creator
    Mac OS X, Windows
    Todd Duell
    FMP 10, 11
    Formulations Pro
    Web: No
    File Type: FP7
    Server: Yes
    FileSize: ~ .67 megabytes
    http://www.formulationspro.com

    Description

    As a developer I'm frequently asked how can I stop users from deleting information from a text field without restricting their access to perform data entry the field. The simple answer is to provide training. The real answer that nobody wants to hear is to hire the best employees. The complicated and expensive answer is to implement an audit trail with rollbacks. The compromise is to add a script trigger that checks for blocks of text being deleted and display a dialog box to the user asking them if they really want to delete the selected content. The script trigger in this solution is dynamic, which means it can be added to any solution and can be attached to as many fields as necessary without modification.

     


    Code

     

    Sample Input

    Sample Output


    Developer's Notes

    See sample file for full demo and technical article.

     


    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-2011 FileMaker, Inc. All Rights Reserved. FileMaker is a trademark of FileMaker, Inc. registered in the U.S. and other countries.