Custom Meta Data Field Behavior: Boolean checked by AppleScript. Won't uncheck by A.S

I have a custom meta data field “Invoice” (identifier “invoice”).

I have an AppleScript that sets a field I specify to checked (or unchecked).

Several other boolean fields have been checked by this script (by providing a value of 1 through a variable); and unchecked by the same script (by providing a value of 0 [zero] through the same variable).

Again, this works with several other boolean custom meta data fields (e.g. “receipt”, “prescription” etc). I can check or uncheck the fields with a script and a variable.

However, the “invoice” field will check by the script, but won’t uncheck by the same script. (This also happens with a boolean custom meta data field “Check”. And yet, I created another boolean field “testbool,” and that one did uncheck with the script. :thinking:

I don’t know what’s making the “invoice” and “check” boolean custom meta data fields un-checkable by my script. I thought there might be some quirk about having too many custom meta data fields (I have about 20.), but “testbool” was that last one I created, and it unchecked with the script.

Here is an image of the script (Sorry. The image appears cut off at the bottom to me, unless clicking on it to go full screen.):

cmd__Key is a variable containing the custom meta data field name. It is filled by a separate macro that simply sets the variable cmd__Key and then executes the pictured macro.

I don’t understand what’s going on with the variables in this macro, or why you’re using a macro in the first place.

I am seeing some inconsistency in changing the boolean state of custom meta data. Development will have to investigate this.