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.

Providing a Boolean Input

Featured Replies

Firstly, apologies if this has been asked before. I’ve searched but it’s difficult to know what to search under!

I have a basic question about layouts. I have a number of fields that require a Boolean answer. I have set them up as Numbers and to format as Boolean. However, I cannot work out the best way to allow the user to enter a Boolean value. At present I have a simple edit box where they enter 0 or 1 (hardly user friendly!)

I have tried a popup or radio buttons using a value list (Yes/No) but can’t see how I can get it to translate that response to a 0,1 result. It seems to translate everything from ther as not 1 (or false).

I guess one approach is to use text and limit the possible values to 'Yes' or 'No' driven from a value list. This is probably safe but doesn't feel right as I've always been told to use numerical values for this sort of thing.

There must be a very simple solution I’m overlooking!

Thanks in advance,

Tatty

Edited by Guest

Create a valuelist with '1' value. Set up field on layout as checkbox & attach the valuelist. Then create a script that toggle the value. Here is the sample file

BooleanInput.zip

  • Author

Thanks for the reply.

I guess the next question then is whether there is anything wrong with storing the values as Yes/No rather than 0/1?

Tatty

Not necessarily wrong, but awkward:

http://fmforums.com/forum/showpost.php?post/234503/

BTW, with a checkbox using a value list of 1, you don't really need a script - you can simply check it on and off.

An important consideration is whether there should be a distinction between empty and 0. But this applies equally to any method (e.g. should there be a distinction between empty and "No").

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.