5 Replies Latest reply on Jan 11, 2013 12:20 PM by philmodjunk

    Will not find a number with a hyphen in the middle

    schamblee

      Summary

      Will not find a number with a hyphen in the middle

      Product

      FileMaker Pro

      Version

      12 with all updateds

      Operating system version

      Windows

      Description of the issue

      If you perform a find with just a hyphen "-" it will not find any records when the text field is number with the hyphen in the located in with the string of number. Such as 123-123, 123-1234.
      link to a post from the forum pertaining to the matter
      http://forums.filemaker.com/posts/1803664cf9?page=2

      Steps to reproduce the problem

      Create a Text field
      Create a few test records with a number with a hyphen located in the number.  123-1234
      Enter find mode
      put a hyphen - in the search box
      perform find

      Expected result

      Found all records with a - located in the text field being searched

      Actual result

      No records are being found

      Exact text of any error message(s) that appear

      No error messages

      Configuration information

      NA

        • 1. Re: Will not find a number with a hyphen in the middle

               S Chamblee:

               Thank you for the post.

               In FileMaker Pro 7 and later the hyphen, colon, and forward slash are treated as word separators unless both characters adjacent to the separator are numerals.

               For more information see:

          Knowledge Base 3440, Word Separators in FileMaker Pro

               If the hyphen starts the beginning of the record's text or a space is placed before or after the hyphen, then the hyphen will be found by the find. 

               TSFalcon

               FileMaker, Inc.

          • 2. Re: Will not find a number with a hyphen in the middle
            philmodjunk

                 We are reporting what happens when the hyphen is NOT a word separator. The knowledge base article does not apply to what we are describing.

                 If the data in the field is:

                 345-567

                 the hyphen is not a word separator and there is no criteria that we can figure out to use in this field to find that record by specifying the hyphen.

                 entering just - fails
                 entering *-* fails
                 entering *"-"* fails

                 

                      If the hyphen starts the beginning of the record's text or a space is placed before or after the hyphen, then the hyphen will be found by the find.

                 Yes, we know that, the link provided documents the efforts of a whole group of us determinng exactly that detail, but it doesn't explain the issue here.

                 And when it IS a word separator, then we CAN find the record and we have no issue to report...

                 As a work around, it's possible to set up a calculation field that returns 1 if PatternCount detects the hyphen and then you can perform a find specifying criteria in the calculation field instead of the original text field.

            • 3. Re: Will not find a number with a hyphen in the middle

                   PhilModJunk:

                   Thank you for the additional feedback.

                    

                   If text field 1 contains 123 and 2 is the search, then no results will be returned. This is also true for 1-3 because the "-" is not a word separator. 

                    

                   "1-3" is treated as a single item string. 

                    

                   Alternatively, if text field 1 contains A-C, then FileMaker sees  "A", "-", and "C" as separate item strings and will find any of the three when searched.

                    

                   TSFalcon

                   FileMaker, Inc.

              • 4. Re: Will not find a number with a hyphen in the middle
                philmodjunk

                     I swear I was getting different results earlier.blush And note that this is consistant with the original post here.

                     Note my use of wild cards. I can find a field with 2 if I use *2* as my find criteria and a record with 123 will be found. If I searched for *-*, I was sure that 1-3 would not be found but I made a few more tests on this and I find that if I specify *-*, I do find the correct records such as 1-3.

                     I then ran some tests on a number field

                     with 1-3, I could still find the record with *-* in this number field

                     Only with text on both sides of the - like you said will the criteria fail to find the record and this is due to the fact that no record separators can be found by specifying find criteria.

                     While I will agree that this is not a "bug" per se. I will still maintain that not being able to find word separators via a find criterion that would find that text if it were not a word separator is not desirable behavior.

                     Now to report back to the original thread...

                • 5. Re: Will not find a number with a hyphen in the middle
                  philmodjunk

                       This also should be documented in FileMaker Help.