6 Replies Latest reply on May 16, 2014 11:01 PM by TKnTexas

    Boolean

    TKnTexas

      Title

      Boolean

      Post

           I normally use Y or N for my boolean feels, since version 3.  It works for me.  However, for a project table, I have a number of fields indicating a step of the process being completed.  I wanted to format as a NUMBER (1 and 0).  There is a summation field to total the fields.  I get a percentage of completion.  I wanted to use RADIO BUTTONS, setting all to 0 (not completed).  

           But it would not show them as YES NO although I did use the DATA format as BOOLEAN.  Switching to a DROP DOWN and it worked for YES NO.  Takes more steps to change.

           Anyone else see this?  Bug? (if I did it right) 

            

        • 1. Re: Boolean
          philmodjunk

               If your value list is defined with the text values "yes" and "no" to get those radio buttons, then a value of 1 in the field will not show as "yes" because the value in the field does not match a value in your value list. Is that what you see here? The value list format will supersede the data format.

               For boolean input, I often set up a single value, value list: 1. and format the field as a check box--click the box to enter a 1, click again to clear it. I can then size the field to show only the check box and not the value associated with it.

          • 2. Re: Boolean
            TKnTexas

                 Everything is formatted as Boolean YES NO

                 For this image I varied the selection method

            • 3. Re: Boolean
              philmodjunk

                   So you want the drop down to list values "yes" or "no" but enter values of 1 or 0?

                   When I phrase it that way, do you see where we are headed?

                   Seems goofy, but you can set up a table of two records where field 1 is 1 and field 2 "yes", and a second record with 0 and "No". Then set up a "use values from a field" value list where the number field is field 1 and hidden and the text field is field 2 and visible.

                   That's one option.

                   Another option is to use a value list of custom values "yes", "no", but use this auto-enter calculation to change them into the equivalent number values:

                   Case ( Self = "yes" ; 1 ;
                              Self = "no" ; 0 ;
                              Self )

                   That way, your value list enters text, it's converted to a number and then your data formatting shows it with your Boolean labels.

                   But to me, a single, single value check box that enters a 1 would seem a simpler option here.

              • 4. Re: Boolean
                TKnTexas

                     I used the case statement above.  Number Field.  I set the fields as Radio Button.  The math aspect works.  But you can see from the screen print that of the three fields, it is not possible to tell which is completed.  But with a sum of 1 for some of them, 1 of 3 is checked.
                      

                • 5. Re: Boolean
                  philmodjunk

                       That option was intended to work with the drop down list format in your first screen shot. I still think a single check box makes more sense here as it is far simpler to implement. I believe that the first option will work with radio buttons.

                  • 6. Re: Boolean
                    TKnTexas

                         I have decided to do a text field for selection.  Then there is a matching calc field that is used to do the math.  Phil I do appreciate you help on this.