6 Replies Latest reply on Nov 17, 2016 3:27 PM by jeffsb

    Is there a logic field type in FileMaker?

    jeffsb

      In Microsoft Access there is a logic field type that is marked true or false or can display as simply a box that is either empty or checked. I'm new to FileMaker and would like to know how to accomplish something similar with the available field types. I am with a nonprofit and for example when someone contacts us we would have a check box if the person happens to be imprisoned, or whether a donor has been sent a thankyou note -- that indicates yes or no or true or false. Any suggestions about how to accomplish this would be appreciated!

        • 1. Re: Is there a logic field type in FileMaker?
          David Moyer

          Hi,

          I simply use 1 and 0 for true and false.

           

          If 1 same as If 5=5 same as If 7>4 same as If IsEmpty("")

          If 0 same as If 5=4 same as If 7>9 same as If IsEmpty("x")

           

          p.s. no, there is no Boolean data type for fields in FM, even though there's a GetAsBoolean function, which I find redundant.

          • 2. Re: Is there a logic field type in FileMaker?
            beverly

            there is a number field "formatting" that can show boolean labels and/or can be checkbox formatted or radio button formatted (using a value list).

             

            I typically use the number field as checkbox (so it can be turned on/off - or true/false) with a value list of "1".

             

            I change the size of the field so that the label of "1" is not shown, but place the name of the field or a text label to match your criteria.

             

            I prefer the number '1', so that it can be counted and summed if needed.

             

            beverly

            • 3. Re: Is there a logic field type in FileMaker?
              David Moyer

              just in case it's not clear from the above posts, use a Number field for Boolean needs.

              • 4. Re: Is there a logic field type in FileMaker?
                BruceHerbach

                FileMaker does have a True and False function.  So you can use set field and set a Field to True or False and it will get a value of 1 or 0.

                 

                You can also put a field in to an if  or case statement as part of a field definition or Set field command.

                If( FieldName ; "Positive result";  "Negative result" )

                 

                The True and False functions also work as a script result.

                 

                If you try and type True or False into a number field it will not produce the desired result.

                 

                HTH

                • 5. Re: Is there a logic field type in FileMaker?
                  jbante

                  Everything everyone else has said is exactly on point. Another thing I see sometimes is folks adding an auto-enter calculation that overwrites the field contents with GetAsBoolean ( Self ) to enforce the range of acceptable values. It isn't necessary, but it adds clarity sometimes.

                  2 of 2 people found this helpful
                  • 6. Re: Is there a logic field type in FileMaker?
                    jeffsb

                    Thank you David Moyer, beverly, Bruce Herbach, jbante for kindly responding to my query.  I'm new to FileMaker and still getting up to speed. I don't fully understand any of these answers but I'm going to wait until I've studied FileMaker program more to ask any questions since then hopefully my questions would be more intelligent. In any event, thank you to all who took the time to answer and I hope and expect to return to this thread later with a little more understanding of FileMaker procedures.