6 Replies Latest reply on Oct 3, 2016 2:34 PM by Tynisha7

    Fields Not Recognized as "Empty"


      Hi all,


      I am trying to write what should have been a very simple calculation for Field2 to look at Field1 and advise if it is blank or not.  I've tried the following calculations, which both work if text is in Field 1 but NOT if Field 1 is empty.


      First attempt:

      if(is empty(Field1);"Missing Information";"")


      Second attempt:

      If(Field1="","Missing Information";"")


      Third attempt:

      Case(Field1="";Missing Information")


      I cannot figure out for the life of me why Field1 is not being recognized as "empty".




        • 1. Re: Fields Not Recognized as "Empty"

          Is this in a calculation field or in a text field with an auto-entered calculation? It might not update to show this message if it's an auto-entered calculation.


          Are you sure the field is truly empty and does not actually contain text that is not visible? A space, a return and a number of other non-printing characters might be present in a text field--causing it to look empty when it is not actually empty. Double click the field and see if anything Highights.

          • 2. Re: Fields Not Recognized as "Empty"

            PHP has a function called empty(). FileMaker has a function called isEmpty().


            If the problem isn't simply a typo, get FileMaker to give you some information, you can use Length( Field1 ) and code(Field1) to discover what you have.

            • 3. Re: Fields Not Recognized as "Empty"



              I think this is a calculation field (the field type is "Calculation", not "Text") however, the calculation result is set to "Text".

              I just double checked Field1 to make sure it was "" and not " ", and was able to confirm there are not spaces between the quotation marks.


              How weird is this? Could it be a relationship issue?

              • 4. Re: Fields Not Recognized as "Empty"
                David Moyer


                once again, I'm piggy-backing on Phil's post ... If there are "invisible" spaces in your data, use this:

                if ( Isempty ( Trim(Field1) ); "Missing Information"; "" )

                • 5. Re: Fields Not Recognized as "Empty"

                  Hi David,

                  I just tried your suggestion but no such luck. Field2 remain empty along with Field1.  Could it be because Field1 is located in a portal? I don't know why that would affect this calculation but nothing else makes sense.


                  Helpless in Texas.

                  • 6. Re: Fields Not Recognized as "Empty"

                    So I had to ask my very busy boss and he helped me figure it out. It was a relationship issue.  First, I had to change Field1 to a different field (I was already using for something else) that uses the List function (a calculation field), which also happened to be in a different table than my original Field1. Next, I had to relocate Field2 to that same table table, then use the If(IsEmpty(Field1),"Missing Information";"". So the two things I erred in were:

                    1) the relationship / location of the fields, and

                    2) I should have used the list function to calculate for Field1.


                    I hope this makes sense and helps anyone else who may encounter the same problem.  Thank you so much Phil, Malcolm, and David for your help!