Prevent unchecking of checkbox?
I have a situation where I am trying to prevent the unchecking of checkboxes in a checkbox set. Checking' a different checkbox is OK, but I want to script-control the un-checking of boxes. I know there are techniques for essentially preventing a user from typing the wrong things into fields: a script trigger that examines what was typed and then exits script [ result: 0 ] if it is something undesired.
I have tried OnObjectEnter and OnObjectModify triggers with the same results (i.e. I can't stop the unchecking of the checkbox). I can TELL if a box is being unchecked or not, but haven't figured out a simple way of preventing the unchecking from happening.
One idea I had was to pass in the value of the set as a parameter (thus getting it's 'before' state) and then compare to the 'after' state (i.e. inside the script) and cycle through it until you find the item that was present in the 'before' but not in the 'after' and then reset that item to the list in the 'after'. But that seems awkward. The method mentioned above where the script just Exit Script [Result: 0] seems much more elegant.
PS. Yes, Phil, I am yet again trying to reprogram FileMaker's native controls, i.e Radio buttons. I have my reasons, and I think they are even good ones. :)
This time I am trying to use a checkbox set as a set of radio buttons. I have three columns of checkboxes, each a separate field but using the same value list. Just like in radio buttons (which you can't configure horizontally...unless I am missing a setting somewhere), I only want the user to be able to click a different option and not to be able to un-select whatever is currently chosen. I.e. there always needs to be at least one item in the three columns checked.