November 4, 201114 yr I want to add a field to my layout that is a checkbox, which I can tick or un-tick to represent a simple Boolean Yes or No. Do I have to create a Value List of One Item? If I create a Value List of "Compiled?", then that is value that gets put into the field, rather than a 1 or 0 or Yes or No? Is there an easier way, or am I going to have to write a script to sort out this seemingly simple piece of interface? Many thanks
November 4, 201114 yr Create a value list of one item, with "1" being that item. Make the actual field narrow to hide the value. Another option is to define the field as a button doing: Set Field [ YourTable::Compiled ; not YourTable::Compiled ] and format the field as Boolean.
November 4, 201114 yr Author I like the sound of the second option. That seems to work: though I need some sort of indicator to show the two states on he button. I'll work on it. Thanks.
November 4, 201114 yr I need some sort of indicator to show the two states on he button. How about the field itself?
November 5, 201114 yr Author I've used Conditional Formatting to make the Button dark when the value is 1 and light when the value is 0. It's not an actual tick box, but it'll do.
November 8, 201114 yr An easy way to switch a boolean field is: Abs ( Sign ( Table::Field - 1 ) ) Or as Comment suggested ... not Table::Field
November 8, 201114 yr BTW, I forgot to mention ... as Michael suggests, you can use the field itself to make the indicators. Put another copy of your field on the layout. Turn off entry to the field. Set the font to webdings on the field. Go to Inspector, Data tab and below, specify Boolean on number. Type a 5 in the non-zero for up indicator and 6 in the zero for down indicator.
Create an account or sign in to comment