Switch the X on the Check Box to a Checkmark
Is there a way to switch the x on the check box to a checkmark in filemaker pro 12?
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:
If [Table::Field = 1]
Set Field [Table::Field; 0]
Set Field [Table::Field; 1]
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.
Ntay28 is correct about this feature now being available under FMP 14. Here's where you find that option in the Data Inspector:
Retrieving data ...