4 Replies Latest reply on Sep 30, 2011 1:08 PM by LawrenceKeyes

    How to realize a boolean attribute under Filemaker 11 PRO?

    BarbaraMaier

      Title

      How to realize a boolean attribute under Filemaker 11 PRO?

      Post

      Hi,

       

      does someone know how to create a boolean attribute under Filemaker 11 PRO? I mean when I have data about my stuff members and I would like to set a 'X' for the attribute 'smoker'. So that in my database there is a 'X' set to my smoker-attribute or something else to know, that he/she is a smoker.

      I would appreciate much for supporting!

      Thank you in advance!

      Barbara

        • 1. Re: How to realize a boolean attribute under Filemaker 11 PRO?
          philmodjunk

          Set the value 1 or any non-zero value for True. Set 0 or empty for False in a number field.

          On your layout, you can use data formatting to specify what text is displayed for true and false values provided you don't need too many characters. (I forget the exact number, something like 7 or 8 letters is the limit)

          You can also format fields with check boxes where 1 is the only check box value. You resize the field to hide the 1 and add your own layout text to identify the "True" value. An empty check box would represent the False attribute.

          • 2. Re: How to realize a boolean attribute under Filemaker 11 PRO?
            BarbaraMaier

            thank you PhilModJunk,

             

            because I'm a newbie under filemaker (I use Filemaker 11 PRO), I need some help. How do I realize this on the given template in Filemaker 11 PRO? I think it's called 'administrations for contact persons' (I don't know how it is really called in english, because I use the german version). I just want to expand this template (already given by Filemaker 11 PRO) with new boolean attributes. May you help me? I'm desperate because it's so new for me, and I want to use it in my future!Weinend

             

            best wishes,

            Barbara

            • 3. Re: How to realize a boolean attribute under Filemaker 11 PRO?
              philmodjunk

              Can you explain in greater detail what you are tying to do?

              I think you need to open Manage | Database | Fields and define some new number fields  in the contacts table to use for your "boolean attributes" but I could be misunderstanding you.

              • 4. Re: How to realize a boolean attribute under Filemaker 11 PRO?
                LawrenceKeyes

                Barbara... Auf wuench, bitte bescheid sagen und ich kann uebersetzen... (d.h. ...
                "versuchen" weil mein Deutsch keine Muttersprache ist...) 

                How to create a checkbox field in FieMaker Pro. 

                For some odd reason, FileMaker Pro does not have a "native" boolean checkbox field. Instead of simply dropping a simple checkbox on to a form (called a layout…in FM Pro),  you have to strictly follow a roundabout procedure to what is a doodle in virtually all other development systems.   
                 
                However, in the English version of FM Pro 11,  one of the sample databases; "People Management" contains checkboxes in the "issues" section for two fields: 
                These are labeled: 
                Is Legal Involved? 
                Is HR Involved?  
                 
                And the field names in the data table are: 
                 
                Flag Legal
                Flag HR 
                 
                Steps to create this: 
                 
                1. In the Value list Editor create a value list named "1" 
                Source = Custom Values
                Values = "1" 
                 
                <!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->
                2. Go to Manage Databases. In your data table,  define the field name for the checkbox field. 
                Give it a field type = Number 
                The sample shows two fields,  Flag HR and Flag Legal (these field names have spaces in them, which is something I would never do.) 
                 
                <!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->
                I created a new field "Smoking" in the Employee table.  Set the type it to "Number" 
                 
                 
                OK….so now the table fields have been defined, and lookup has been defined. Now, what remains is displaying the field in your layout.    
                 
                3. On the layout Add  the new field and choose the new Smoking field within the Employee table
                 
                <!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->
                4. In the Inspector,  edit the properties of the field to change the field type to 
                Checkbox set
                and change the value list to "1".  (the name of the value list....)  
                 
                <!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->
                5.  Adjust the size of the field to cover up the "1' 
                 
                <!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->
                This appears to give a value of "1" when checked,  and I'm a assuming, a 'null' or 0 when unchecked.   Anyway, in a query for people who smoke, you'd have to look for smoking =1   I think.  Not intuitive.  It would be nice if there was a "real" boolean data type within  Filemaker.   
                 
                I will post this with screen shots on my blog at techfornonprofits.com 
                 
                I'd appreciate comments and corrections.  from the FM experts.   
                 
                --- L