8 Replies Latest reply on Oct 2, 2013 6:19 AM by philmodjunk

    Find Error

    Jepperson

      Title

      Find Error

      Post

           I've created a search layout for individuals and their information in my database. When I search for an individual the search won't return a name "Jonathan" when I search for "Jona", but the same script setup will find a Group "poplar" when I search "pop" in my group search layout. Anyone have any ideas?

      individual_search.png

        • 1. Re: Find Error
          philmodjunk

               Don't see any reason why that would be the case, but your script has a set field step that does not appear to do anything here.

          • 2. Re: Find Error
            AndrewCohn

                 I am not sure why you are having the exact problem you are described, but I see that your script might have some unnecessary steps. Why do you have two "Enter Find Mode" script steps? Also, as far as I can tell your "Set Field" script step will do nothing, it will set the Individuals::Name field to "" [blank] and should not be needed. You might want to try using Go To Field script step instead if you need to set the focus to the Name field. You can also set the tab order on your layout so that the Name field is first.

                 So try the following:

                 Enter Find Mode

                 Go To Field Individuals::Name

                 Pause/Resume Script

                 Perform Find
                  

                 Assuming you have a button on the layout that performs the find after the user enters the Name or other parameters, make the button action Resume Script.

            • 3. Re: Find Error
              Jepperson

                   Thanks for your help guys, I took the unnecessary lines out of my script. Would you guys happen to know the type Find I'm trying to do? Find for Jon and have it return Jon and Jonathan. Thanks for your help.

              • 4. Re: Find Error
                philmodjunk

                     Simply specifying Jon--either manually while paused in Find Mode or via set field after entering Find Mode (your script is confused as to which method should be used), should be sufficient to find all records where the field has a word that starts with "Jon". So why this is not happening for you remains a mystery.

                     If you just do a manual find, no script--just enter find mode, type in Jon and click "perform find", do you get the expected results?

                • 5. Re: Find Error
                  Jepperson

                       no, I tried the quick find for "jon" all it returns both "jon"s and not  "jonathan" or "Jonathan Davis". I wonder if it is because I have both first name and last name in the name field and not broken into fields Last Name and First Name. Maybe the space in between the names throwing it for a loop?

                  • 6. Re: Find Error
                    philmodjunk

                         I did not suggest using quick find for this test, but that should also work. The space, if it is really a space character and not some other non visible character, should not be an issue.

                         Make sure that your field is of type text, not number.

                         Double click this text in one of your records. Does the double click select just the first name or does it select both first and last names?

                    • 7. Re: Find Error
                      Jepperson

                           The double click just selects the first name, a triple click selects both names.

                      • 8. Re: Find Error
                        philmodjunk

                             But is the field of type Text when you check it in Manage | Database | Fields?

                             If so, then I see no reason why "jon" won't find both Jon and Jonathon.

                             Let's try this: Use Recover from the File menu to recover a copy of the file. Perform a find with jon on the recovered copy. If that works, it sounds like your database has a corrupted index on that field.