3 Replies Latest reply on Jun 16, 2014 1:54 PM by beverly

    Simple script to enter find mode

    christinethept

      I feel like this should be really simple but I'm a newbie and have spent an hour trying to get a script with no success. What I want the script to do is not perform a find, but set up the user to perform a find of a given field. So...from the main menu they would select the button to "find/edit existing student", this would take them to student records, put the cursor in a blank "student name" field, and allow them to search for an already existing student.

       

       

      Thanks!

      Christine

        • 1. Re: Simple script to enter find mode
          BruceHerbach

          Christine,

           

          There are a number of ways to do this.  Here is a possible script

           

          Go To Layout ["Student" (Student)  //  Assumes layout and table name is Student

          Enter Find Mode[]    //Notice no find criterial

          Go To Field [ Student::StudentName ]

           

           

          This will go to the layout, enter find mode and put the user in the name field.  Make sure that there is a button to Perform find on the layout.  A cancel button is also a good idea.  The cancel button can return the user to Browse mode or be scripted to enter Browse mode and return to your button screen.

           

            You can add Tooltips to give the user instructions.  I would suggest doing this on the button that starts the process.

           

          HTH

          • 2. Re: Simple script to enter find mode
            christinethept

            Wow, that was as easy as I thought. I must have looked at the list of script steps 50 times and didn't see "Enter find mode". Thanks!

            • 3. Re: Simple script to enter find mode
              beverly

              Christine. I often put in "test" in so that the same button enters find mode AND performs the find.

               

              If ( Get ( WindowMode ) = 1 // find mode )

                   Perform Find

              Else

                   Bruce's script here

              End if

               

              Beverly