November 21, 200817 yr 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, 200817 yr by Guest
November 21, 200817 yr 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
November 21, 200817 yr 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
November 21, 200817 yr 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