TattyDon Posted November 21, 2008 Posted November 21, 2008 (edited) 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 November 21, 2008 by Guest
MetaSys Software Posted November 21, 2008 Posted November 21, 2008 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
TattyDon Posted November 21, 2008 Author Posted November 21, 2008 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
comment Posted November 21, 2008 Posted November 21, 2008 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").
Recommended Posts
This topic is 5846 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now