Add a 'show custom dialog' step temporarily to the top of the script, make it print the value of Order::checkbox so you can see what the value is, checked and unchecked, from there you can modify your script to behave as expected. This is a good way to debug scripts in general. If you're expecting your set field statement to set the field to zero, have another look at the definition of set field, the zero is supposed to be the value being set, not the repetition number, i.e Set Field[Order::checckbox; 0]
Use a single step script:
Set Field [ Order::Checkbox ; not Order::Checkbox ]
BTW: you need neither a scrpt nor a trigger, just place this calculation into the auto-enter option for the check field:
Self + 0
Thanks for the tip. With "Self + 0," I got a result of "null" (empty set... not what I wanted). So, I adjusted the calculation in the auto-enter option for the check field to: Self - 0
However, I'm using a SQL DB & it seem to enter the "1" as a text, not a number. I thought this would work for me (if it wasn't SQL, it would), so I checked it as "Best Answer" but now see it doesn't quite work
Right ( 0 & Self ; 1 )
BTW, I posted an alternate method but I see that raybaudi's suggestion works ONLY if you uncheck in calc dialog, 'do not evaluate if all referenced fields are empty. So I deleted my suggestion. Either calc will work; also be sure to disable 'do not replace existing data' as I've indicated.
And as I said originally, the records should pre-enter 0 as auto-enter DATA.