Report comment

Here is a script using your calculation to toggle a boolean value in FileMaker, that can be pasted into any file with no dependencies:

Toggle Boolean [ fieldName ]
---
Set Variable [$fieldName ; Value:Get (ScriptParameter)]
Set Variable [$fieldValue; Value:GetField ( $fieldName )]
Set Field By Name [$fieldName; Abs ($fieldValue - 1)]

Use the GetFieldName function to pass the parameter, and the script won't break if the field name changes in the future.