7 Replies Latest reply on Mar 19, 2017 4:28 PM by genci

    Can't search for a empty date field

    genci

      Hi!

      I'm stuck on making a "search" of an empty date containing field. In a layout that contains a tab records, I have this date containing field from a related table(with a primary key). I tried by typing = and "=" into the field, but it says that "no field matches that criteria". How can I resolve this?

      Thanks for the help!

       

      Windows 7 Home, Filemaker Pro 12 Advanced.

        • 1. Re: Can't search for a empty date field
          TomHays

          Type in ==

           

           

          -Tom

          1 of 1 people found this helpful
          • 2. Re: Can't search for a empty date field
            philmodjunk

            Put an asterisk into the field and make it an omit request.

             

            If the field is from a related table, this will find cases where there is no related record.

            1 of 1 people found this helpful
            • 3. Re: Can't search for a empty date field
              keywords

              There have ben many previous posts on issues such as this where the problem turned out to be that fields that appeared to be empty were in fact not, because they contained an invisible character—space or carriage return. You should run checks to eliminate this possibility.

              • 4. Re: Can't search for a empty date field
                TomHays

                In rereading your question, I noticed how you described that the date field you are searching is in a related field.

                 

                If you are looking for records that have an empty date on the otherwise related record, then the suggestions above apply.

                 

                If you are looking for records where there is no related record and thus the date is empty, then the search on that related date field will not find them.

                 

                For example say you are searching for the child's birthdate.

                You are searching parent records.

                Adam has a child record Alexander with a birthdate of 3/12/2010.

                Betty has a child record Bianca with no birthdate entered.

                Charles has no child record.

                 

                You have a layout displaying the parents and showing with the related field Child::Birthdate.

                 

                Search for empty on birthdate (for example using just == in the field for the search).

                Only the record for Betty will be found since she has a related record and the birthdate is empty.

                 

                If you do also want to find Charles in the search (ones with no child records),

                you can put another field into your table that is a copy of the related field and search on that.  For example you could put a calculated field as

                Birthday_Child_Eldest = Child::Birthday

                assuming that the related fields are sorted by Birthdate (ascending).

                 

                -Tom

                2 of 2 people found this helpful
                • 5. Re: Can't search for a empty date field
                  genci

                  Thank you, very much, guys! It works in both of the solutions you gave me. Remarkable the readiness and exhaustive way  of the replies, I appreciate it!  Many thanks, again!

                  Genci

                  • 6. Re: Can't search for a empty date field
                    philmodjunk

                    If you use the method that I recommended, you don't need that extra field. Just put an asterisk in the field to find all records where a related record exists where the field is not empty, then find all the "omitted" records by making it an omit request.

                    • 7. Re: Can't search for a empty date field
                      genci

                      Yeah, philmodjunk, I did that and it works fine.  I'm relieved, indeed. Thanks a lot!

                      Genci