7 Replies Latest reply on May 7, 2014 4:00 PM by philmodjunk

    First record in Find not working

    lijnbach

      Title

      First record in Find not working

      Post

      Hello everybody,

            

      I am already struggling all afternoon. This is what is going wrong.

            

      I want to perform a find based on global fields. (Using 4 finds in one script). It all works fine, except one of them. The script looks like this (example);

            

      Goto Find

      Set Field [Contracts::Contract Code; Global Fields::Contact Start; Global Fields::Contract End]

      Perform Find

            

      They are all working fine, except one. I have one, that seems to start always with the next one in row. 

            

      It is a Text Field with values from 01-AA until 99-ZZ. I select the values (e.g.) from 01-AA until 02-BB from a value list. If i do so, the result is only 02-BB. If I select 01-AA until 99-ZZ, I get them all, except 01-AA.

            

      It is not the scrip. If I go directly to the lay, without a scrip, and goto Find, and type 01-AA..02BB, I only get 02-BB. If I type 01-AA..99-ZZ, I get them all, except 01-AA. If I type 01-KK..99-ZZ, I get 01-JJ until 99-AZ.

            

      But, if I type only 01-AA (without “..” (until)) I get 01-AA. So it only goes wrong if I use the “..” (from-until) and only in this situation. And it is only for one of the finds. The other 3, and all others in the database, are working fine.

            

      Thanks in advance,

            

      Hans Lijnbach.

        • 1. Re: First record in Find not working
          philmodjunk
               

          Set Field [Contracts::Contract Code; Global Fields::Contact Start; Global Fields::Contract End]

          Is not correct syntax for the set field step. Trying to set it up this way should result in an error message when you close the calculated result dialog.

               I would guess that you actually used this step:

          Set Field [Contracts::Contract Code; Global Fields::Contact Start & "..." & Global Fields::Contract End]

               I can get the same issue here, using 01-AA...03-CC as search criteria will not find the record with a value of 01-AA. I could find it if I used 00-AA...03-CC, but this shouldn't be the case as far as I can tell.

               You might want to report this as a bug over in Report an Issue and see what the TS people have to say about this.

          • 2. Re: First record in Find not working
            lijnbach

                 Hai Phil,

                 Sorry, I did use &".."&.

                 The strange thing is that the problem also occurs if I type in the search criteria directly in search mode in the lay out. And it is only on this field. The others don't have this problem. In an mean while I changed all the items (I changed it from 01-AA into AA-AA etc). Same problem.

                 I tried a complet empty lay out, without any script, with only this field, same problem. I deleted all the field properties, like index etc, no value list etc. Same problem. Recovered the database, same problem.

                 You seem to have the same problem in your test. If a user wants to search, in many cases they start at the first one, in my case 01-AA. And that one is always missing in the search. And if you use only 01-AA without ".." until, it works fine.

                 I can understand that it could be a bug, but why only on this field? Strange. I will report it as a bug, but tomorrow, it is 01.00 a.m. and I am already tired of this problem.

                 Thanks Phil.

            • 3. Re: First record in Find not working
              philmodjunk

                   yes, I was testing this by manually entering find criteria and getting the same results that you reported.

              • 4. Re: First record in Find not working
                lijnbach

                     O.K. Phil,

                     I couldn't let go. Kept on testing with other ID's.

                     It works when I remove "-" between 01"-"AA

                     It is really a bug.

                     Thanks for your support Phil, will report it tomorrow.

                     Hans Lijnbach

                • 5. Re: First record in Find not working
                  philmodjunk

                       It's more likely a factor in how FileMaker indexes the values in a file--something that then affects how finds and sorts work. FileMaker is treating the two parts of the field's value as two separate words rather than a single word and indexes the two values separately. But by all means report this, TSGal has previously come up with some nice work arounds for similar find issues and I'm curious to see what she might recommend in this case.

                       One obvious workaround is to set up a calculation field that removes the hyphen and search on it instead of the original field, but there may be another way to get the same result that I don't know.

                  • 6. Re: First record in Find not working
                    lijnbach

                         O.K. Phil,

                         It is not a big deal, but a lot of work. It is not only this field, but there are related fields, that keep on counting. I start with 01-AA but the related records go on, 01-AA-001 and then 01-AA-001-001. So it's not a big deal, but a lot of work. I use the "separator" to make the values easy to read. I can use another separator, or do it without.

                         I will report it tomorrow, and let you know. (It's 01.45 a.m. in a mean while).

                         Thanks,

                         Hans Lijnbach.

                    • 7. Re: First record in Find not working
                      philmodjunk

                           Here's a simpler way. Go to manage | Database | Fields. Find and double click the field to open Field Options. On the storage tab, use the "default language" drop down to change the indexing to "unicode" (the last value in a long list).