4 Replies Latest reply on Nov 27, 2012 1:03 PM by philmodjunk

    find mode script

    EricaJackson

      Title

      find mode script

      Post

           Hi

           I have a basic script button that goes to the field and enters "find mode" I would like to type the client's name and have it perform the find  when Entered but I can't seem to figure out the step.

           Go to Field [visit_CLIENT::ClientLast

           Enter Find Mode [pause]

           Thanks!

           Erica

            

        • 1. Re: find mode script
          philmodjunk

               Create two scripts.

               Script 1:

               Go to Field [visit_CLIENT::ClientLast]
               Enter Find Mode []----> clear the pause check box

               Script 2:

               If [ Get (WindowMode ) =  1 // window is in find mode ]
                  Perform Find[]
               End If

               Use OnObjectSave script trigger on your ClientLast field to perform the second script.

               An alternative approach is to have a global field for entering search criteria and then a script can enter find mode and use Set field to transfer the criteria from the global field to the field in which the criteria is specified, then the script performs the find.

          • 2. Re: find mode script
            EricaJackson

                 Hi Phil

                 Ths isn't working I created the script and did set the script trigger for that filed. When I click the button with my orginal script and I enter the client name and then when I hit the "enter" key nothing happens, the cursor is still in the client name field.   Am I supposted to enter some criteria between the Perform find [ ] brackets?

                 Thanks

                 Erica

            • 3. Re: find mode script
              EricaJackson

                   I found the problem, I had used "perform find/replace" by mistake.  

                   Thanks Phil!

              • 4. Re: find mode script
                philmodjunk

                     Interesting. I has assumed that you could trip script triggers while in find mode, but according to my tests, you can't.

                     This single script would work:

                     Go to Field [visit_CLIENT::ClientLast]
                     Enter Find Mode [pause]
                     Perform Find[]

                     Buy you have to presse Enter (The enter key on the number keypad) or click the continue button in the toolbar to perform the find.