5 Replies Latest reply on Oct 27, 2015 11:46 AM by Rackman

    Quick Search scripting question.

    Rackman

      Hello,

       

      I just upgraded to FMP 14 and am having trouble with what I'm sure is a simple script (I am not proficient in script writing at all).

       

      I've created a Quick Search field and would like to perform a quick search on any query entered into it throughout my database.

       

      The following script works accept it also includes the record I was in when I perform the search, even though that record may or may not actually meet the entered search criteria.

       

      How can I modify my script to perform a brand new search and not include the record I'm currently in unless it were to match my search criteria?

       

      Perform Quick Find [ IFO Contact Management::Quick Search ]

      Sort Records [ No Dialog ]

      Go to Record/Request/Page [ First ]

      Set Field [ IFO Contact Management::Quick Search ; "" ]

       

       

      Thanks in advance for any suggestions.

       

      Joe

        • 1. Re: Quick Search scripting question.
          jbante

          The record you started on probably does match the search criteria, though perhaps it isn't obvious how. Start by confirming that your IFO Contact Management::Quick Search field is using global storage. If it isn't a global, then the Quick Find could very well be matching on that field — the contents match the find because you just put them there to do the find. Also check each field on the layout for what is and isn't included for Quick Find.

          • 2. Re: Quick Search scripting question.
            Rackman

            You solved the problem jbante!

             

            I did have Quick Search enabled in my search field.  I disabled it and now the script works fine.

             

            I just upgraded from an older version of FMP which didn't have Quick Search in it so I totally forgot about enabling/disabling the feature in the field.

             

            Thank you very much for your help!

             

            Joe

            • 3. Re: Quick Search scripting question.
              Rackman

              Hello jbante,

               

              Thanks again for your help with my script.

               

              I'm running into another problem with it now.

               

              When I enter text in the 'Quick Search' field, the text I entered isn't getting deleted from the 'Quick Search' field but only in the record I was in when I perform the search.

               

              As you can see in the above scrip, I have a line in there to set the 'Quick Search' field to blank.

               

              Any suggestions on how to get the script to delete the text in the 'Quick Search' field from within the record I'm in when I request the search?

               

              Thanks again,

               

              Joe

              • 4. Re: Quick Search scripting question.
                jbante

                Make your quick search field a global field. This way, each record doesn't have it's own copy that can persist if you don't land on that record at the end of the find.

                • 5. Re: Quick Search scripting question.
                  Rackman

                  Perfect!

                   

                  Thanks again for all of your help.

                   

                  Joe