6 Replies Latest reply on Nov 17, 2011 7:46 AM by patricia

    Find Script Issues

    DebbBergen

      I created button to perform a simple find script. This button also, when used, while in Find Mode, used to complete the find (see attachment) It was a script I copied from one of the "FMP Family" last year.

       

      It used to work great. Now, if I am in Find mode and click the "find script" button again, it DOES perform the find, but then goes up to the pause script line and pauses. This doesn't seem to cause issues, however, I know that if the screen is in "Pause", it eventually stalls something down the road.

       

      Where did I go wrong? (I could add a Halt Script step to completely stop the script, but do I need to?)

        • 1. Re: Find Script Issues
          patricia

          You have an extra step. Take out the Pause indefinitely and change the following step by adding a Pause

           

          Enter Find Mode(pause)

           

          patricia

          • 2. Re: Find Script Issues
            DebbBergen

            If I take out the pause step, it completes the find without allowing the

            user to enter data.

             

            Deborah Bergen

            Software and Solution Design Specialist

            Aberdeen School District

            (360) 538-2235

             

            "*A wise person lives the life that withstands the peering of all who care

            to look* "  - unknown

            • 3. Re: Find Script Issues
              RayCologon

              debbbergen wrote:

              Where did I go wrong?  (I could add a Halt Script step to completely stop the script, but do I need to?)

               

              Hi Deb,

               

              The problem you've described stems from the fact that when the button is clicked a second time, it causes a second instance of the script to be placed on the stack - so when the second instance completes (returning the user to Browse mode), the first remains active (paused).

               

              To address this, I suggest you change the "Current Script" attribute in the Button Setup dialog for your find button from the default setting (Pause) to "Exit", as shown in the image below:

               

              ButtonAttribute.png

               

              With this change, if the button is clicked a second time, the second instance of the script will replace the first, rather than being added to the stack.

               

              Regards,

              Ray

              ------------------------------------------------

              R J Cologon, Ph.D.

              FileMaker Certified Developer

              Author, FileMaker Pro 10 Bible

              NightWing Enterprises, Melbourne, Australia

              http://www.nightwingenterprises.com

              ------------------------------------------------

              • 4. Re: Find Script Issues
                techt

                Ray, I like your method of addressing this better than mine. I've been looking at the mode state and then acting accordingly. Thanks!

                 

                I've noticed this behavior in a couple of places. It seems to be more prevalent on trackpads or the MagicPad, especially when set to treat a tap as a click.

                • 5. Re: Find Script Issues
                  DebbBergen

                  THANK YOU!  That worked perfectly.  I really need to go back to a basics

                  class when it comes to easy stuff like this!

                   

                  Deborah Bergen

                  Software and Solution Design Specialist

                  Aberdeen School District

                  (360) 538-2235

                   

                  "*A wise person lives the life that withstands the peering of all who care

                  to look* "  - unknown

                  • 6. Re: Find Script Issues
                    patricia

                    Nice option Ray.

                     

                    Debbie the pause I am talking about is on the script step no the button which allows you to pause while entering data in find mode and use a continue option. Ray has given you a better option over all for the script.

                     

                    Good luck patricia