Is there any reason you want to do this with checkboxes? The behavior you describe is exactly what you get with radio buttons (you can only play one station on the radio at one time), whereas checkboxes are used for situations where you can have more than one checkbox checked (for example, a field with fruit color might show the bananas as both yellow and green at the same time). So to get what you want, set the field up as a radio button field.
It is possible to set it up as a checkbox if you really, really want to, but that involves having scripts that are triggered to eliminate other entries.
Thanks to everyone who replied so swiftly! thurmes is probably correct - I should use radio buttons because checkboxes are intended to "stack" with each other, and I don't want that at all.
Thanks again, you guys rock.
First create a value list with your three values and give it a name.
Put your field on a layout and use the inspector, Data tab, to assign the field as a radio button and use the value list you created.
Now the radio buttons will show your values and the one you select will be entered into the field.
Place a plain text field next to the radio button so you can see the value entered into the field.
Note that searches using the status bar cannot be used with a radio button or checkbox to find empty fields...
Since you've already set this up, its possible you have more than one valuein the field and you'll need to clean that up.
Using the field definitions you can set a default value to be entered when you create the record.
There isn't a need to create scripts to trigger an elimination other entries. Using the following auto-enter calculation will accomplish this: RightValues(self;1). Uncheck the Do not replace existing value of field.
With the caveat that the xValues() functions add a trailing CR; so as an alternative:
GetValue ( self ; ValueCount ( self ) )
My values are a little suspect . I forgot to add a substitute to the calc. Usually use Substitute(RightValues(Self;1);"¶";"") which removes the CR. I always find the CR annoying when finding one value with a Value function. Not sure what the purpose of the CR is since I can easily add a CR to the calc if needed.
Not sure what the purpose of the CR is since I can easily add a CR to the calc if needed.
According to the Documentation: "Each value that is returned ends with a carriage return, allowing lists to be easily concatenated." There, it's supposed to be a convenience feature …
Here's hoping for a modernized syntax that allows something like
GetValue ( someList ; -1 ) // last item
GetValue ( someList ; 1..3 ) // items 1 and 2
GetValue ( someList ; 1...3 ) // items 1-3
which would do away with xValues (and hopefully the trailing CR, too).