Toggle

Version 2

     

    Calculation

     

    Compatibility
    Creator
    Mac OS X, Windows
    Simon Plint
    FMP 7, 8, 8.5, 9, 10, 11
    Newcastle Innovations
    Web: Yes
    File Type: FP7
    Server: Yes
    FileSize: ~ .23 megabytes
    http://

    Description

    Toggles a 0 or 1 value in a field which can be used as a boolean flag.

     


    Code
    ABS(Input-1)

     

    Sample Input

    Sample Output
    0

    1

    Developer's Notes

    This calculation can be used in a script or simply in a SetField script step attached to a button. The button could be a calculation field that returns a graphic which indicates the on/off status of the field being set.

     


    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.