5 Replies Latest reply on Sep 11, 2013 1:38 PM by philmodjunk

    Problem with less than (<) operator

    CraigByer

      Title

      Problem with less than (<) operator

      Post

           I'm having a problem with a less than operator when performing a find. When I perform a find for "<0" it is not returning any results Yet, when I sort all of the records, there is negative values in the the results. The really confusing thing is that it used to work properly. I was wondering if anyone had any ideas what is going wrong.

        • 1. Re: Problem with less than (<) operator
          philmodjunk

               Did the criteria you used also include the quotes you show in your post? (If so, leave out the quotes and see what happens.)

               Is the field truly a number field and not a text field? (Use Manage | Database | Fields to check.)

          • 2. Re: Problem with less than (<) operator
            CraigByer

                 No, it did not include quotes.

                 The field is a calculation, returning results as a number.  

            • 3. Re: Problem with less than (<) operator
              philmodjunk

                   Are you performing the find manually or via a script?

              • 4. Re: Problem with less than (<) operator
                CraigByer

                     Via a script usually, however I just tried manually and that does not work either.

                • 5. Re: Problem with less than (<) operator
                  philmodjunk

                       Unless you are accidentally searching the wrong field or specifying additional criteria that then omits some records with negative values, it would appear that the file may be damaged or perhaps just the index for this field.

                       To rebuild the index of a single field:

                         
                  1.           Open Manage | Database | Fields and double click the field
                  2.      
                  3.           Use either the storage tab or the storage options button to turn off indexing.
                  4.      
                  5.           Exit Manage | Database, then return and turn indexing back on.

                        

                       You can also rebuild all your file's indexes by importing all the data into an empty copy (clone) of your file.

                       If you have FileMaker 11 or newer, you can use Advanced Recovery options to rebuild your file's indexes:

                         
                  1.           With the file closed, select Recover from the File Menu.
                  2.      
                  3.           Select "Use advanced Options"
                  4.      
                  5.           Select only: "Copy File Blocks as-is" and "Rebuild Field Indexes Now".
                  6.      
                  7.           The recovered copy of the file will be identical to the original copy except that it has completely rebuilt indexes.