Not and actually have it be a checkbox layout format.
You can create something that simulates the check box functionality where the control you place on the layout functions identically to a check box group and then you can use layout text or a graphic in a container field to produce a "tick" or check mark instead of the x.
This requires some scripting and (for a checkbox list of multiple values) a bit of design work to get the necessary tables and relationships in place, but it can be done.
You'll have to decide if the cosmetic change from x to checkmark is worth the time and effort to bring it about.
For one possible example, see the check boxes layout in the following demo file. While the demo still uses an x, this x is actually layout text and you could easily edit that layout to change the x to a tick mark character and it would still function as it does in the demo file: https://www.dropbox.com/s/oyir7cs0yxmbn6i/ManyToManywDemoWExtras.fp7
Someone else in the forum pointed out a fairly painless way to accomplish this:
- Create a number field and put it on your layout where you want the checkbox to be, then select it
- On the Data Tab in Inspector:
- Leave the Control Style set to Edit box (don't change it to Checkbox set)
- On the Data Tab in inspector, under Data Formatting, set Format to "Boolean"
- In the "Show non-zeroes as:" box put a checkmark symbol (you can either Insert a Symbol in Microsoft Word then copy and paste it here or you can type the alt-code for a checkmark, for example Alt + 0252)
- In the "Show zeroes as:" box erase the default "No" so there is nothing.
- On the Appearance Tab in Inspector, set the font of the number field to the same font as the symbol you put in the "Show non-zeroes as:" box. For example if you got your checkmark symbol by inserting a Symbol in Microsoft Word using Arial Unicode MS character 2713, make sure your number field uses Arial Unicode MS font. Or if you just typed Alt + 0252, then use the Wingdings font.
- Setup your number field as a button with a script like this:
If [Table::Field = 1]
Set Field [Table::Field; 0]
Set Field [Table::Field; 1]
- Format your number field as desired. For example, setting the size of the field to 20 pixels by 20 pixels and putting a light gray border around it, adjusting the font size to your taste, etc.
Very nice Nathan, I like this solution, thank you!
THis is exactly what I'm looking to do as well
However, when I select my field my "Data Formatting" area in the Inspector is grayed out and says "No options available". Is there something I'm not doing correctly that would let me edit this field to show a check mark?
Sorry, I think it has to be a number field instead of a text field. I updated my original post with this change. By the way, version 14 now has native support for showing a check mark instead of an X, making this workaround unnecessary.
If you don't want an If statement, you can reduce it to:
Set Field [ Table::Field ; Mod ( Table::Field + 1 ; 2 ) ]
or the age-old method of:
Set field ( mycheckbox ; Abs ( mycheckbox - 1) )
This allows for "empty-to-start" to become 1 when checked.
That works as long as there is no way to put anything in the field other than a 0 or 1. The MOD form keeps it binary regardless of the starting value.
Number field with validation?
Yes, you would need to set the range to 0 to 1 using your method and that would preclude anything else since there wouldn't be any way for someone to mess things up.
It occurred to me last night there is a simpler switch:
mycheckbox = not mycheckbox
This works if the field is a number and boolean is desired. Or if the field is TEXT with value list of 0 & 1 (or just 1).
If the text field is other values (yes & no, for example), it will introduce 0 or 1 into the field.