Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I remember doing this in the past but just plain forgot the method.

I have a "text" on a layout which asks for one of two checkboxes to be selected (i.e. Answer=  Yes No).  As it is now, both checkboxes can be shown as "checked" (or "not empty).  I want it to be set up so that if "yes" is checked and then later "no" is checked, the checkmark in "yes" will disappear.  In other words, only one of the two boxes can be checked.

 Additionally, could there be a third box (i.e. Answer= YesNo N/A) which would work the same way with only one being able to show a checkmark.

You can use the auto-enter calc 

GetValue ( Self ; ValueCount ( Self ) )

to have the field automatically be set to the last checked value. 

Note that the metaphor of Checkboxes is to accommodate multiple values; what you want are actually Radio Buttons.

Edited by eos

Use radio button set instead of checkbox set.

Still use EOS calculation because a windows user can simply shift-click to set multiple values in a radio button

Hi Michael,

Agree with eos (and Miss A) that the Radio Button set is the correct UI device for mutually exclusive choices.  Note that in FileMaker, a user can choose multiple options even in Radio Button sets by using the Shift modifier key, so eos' auto-enter calculation is an essential tool to keep in your toolbox whenever enforcing single values is paramount.

That said, for Boolean "Yes/No" fields (putting aside the "threee-value logic" Yes/No/NA case you mentioned), the simplest UI approach is often a single checkbox, where the checked/unchecked state represents your "yes" and "no" values respectively.

My approach for handling this is to place a single checkbox on the layout tied to a "Boolean True" value list with only the single value "True" (or 1), hide the value itself — the field label will identify the semantic meaning of the control — and set the field to this auto-enter calc:

GetAsBoolean ( Self )

I also auto-enter data (either 0 or 1) to set the default value for new records.  This way checking/unchecking the box will toggle the value between True and False, and the multiple-value problem is eliminated.

  • Author

Y'all are great.  Didn't even think about the radio button thing.  It works perfect (created two value lists, one be yes and no and the other being yes and no and n/a.  When a new record is created the two (or three) items show up as desired (an empty ☐).  Checking any button/box places the button there, which is fine because it doesn't really need to be a √ checkmark.  

However, once one of the buttons is selected it cannot be deselected except by checking the adjacent box which puts the button there.  Is there any way to clear the boxes completely?

Also, the boxes (buttons) show up about with 60-65 points spacing.  Any way to reduce that to, say, 25 points?

personally i would create the field that holds the value either [ 0 | 1 | 2 ]  and then assign meaning to these

0 = NO
1 = YES
2 = N/A

For a simple boolean toggle Abs ( table::fieldName - 1 )  is a great way to do a toggle a boolean value.

And of course you need to assign the field to auto inter your desired default value since a NULL value is yet another option. That is if you require the value to be filled. 

I would use buttons on the layout to either explicitly set the value or use a toggle script. Then using the inspector you can toggle the visibility of the button object to in effect provide you a toggle.

example 

http://www.seedcode.com/filemaker-13-animations/

created two value lists, one be yes and no and the other being yes and no and n/a.

That would make sense only if the field is supposed to have four states (empty, Yes, No, N/A) or if the field is not supposed to be ever empty. Judging by what you say next, that's not your situation.

 

However, once one of the buttons is selected it cannot be deselected except by checking the adjacent box which puts the button there.  Is there any way to clear the boxes completely?

You can place the cursor inside the field and press Delete. Or use a button to set the field to empty.

 

Also, the boxes (buttons) show up about with 60-65 points spacing.  Any way to reduce that to, say, 25 points?

I don't think so, but you can always design your own look using buttons and conditional formatting. The field itself doesn't even need to be on the layout.

 

 

 

 

For a simple boolean toggle Abs ( table::fieldName - 1 )  is a great way to do a toggle a boolean value.

Is it? I believe:

 not Table::FieldName

is both simpler and more ... Boolean-like?

Edited by comment

not Table::FieldName

thanks @comment - what do you know; learn something new every day - time to retire that old toggle technique from my brain.  

However, once one of the buttons is selected it cannot be deselected except by checking the adjacent box which puts the button there.  Is there any way to clear the boxes completely?

Shift click will deselect any selected radio button option

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.