4 Replies Latest reply on Apr 15, 2015 1:03 PM by disabled_jackrodgers

    Filemaker Go focus changes after script exit

    mcrip

      I've been banging my head against this for a few hours.  Searching the discussions didn't yield anything usable (but then again, hard to narrow down the correct issue).

       

      When I try to use this script in FileMaker Pro Advanced it works just fine.  I've stepped through it with the debugger and no errors are reported.  I've tried it both on the layout for FileMaker Pro and the FileMaker Go optimized layout and it behaves the same when run from the FileMaker app (both with and without the script debugger).

       

      However when I copy this file over to my iPad and try the exact same task on FileMaker Go, once the script exits (after doing exactly what it was suppose to do) the focus changes from the object select as the last step in the script, to a pop-up menu, which is the first item in the tab order.  And of course, the most annoying thing for it to be focusing on since it opens the pop-up as part of that.

       

      I put a long pause in the script to make sure the focus was changing on the iPad (the difference on this button in focus change is a bit subtle) and it does.  But as soon as the Pause finished the focus goes back to the pop-up menu.

       

      There are no script triggers associated with they layouts.  There is no script trigger associated with the button it changes focus to.  The only script triggers on the layout are the ones associated with the triggering of the script.

       

      I'm guessing this will turn out to be something incredibly simple that I've completely overlooked ...

       

      Any suggestions?

       

      Oh yes, this is Filemaker 13.0v5 on Mac OS 10.8.5 and Filemaker Go 13.0.0.8

        • 1. Re: Filemaker Go focus changes after script exit
          mikebeargie

          try using Exit Script [result = 0]

           

          a script trigger by definition is attached to an action, an action that completes running even after you run a script. EG onObjectEnter will still go to an object, even if the last step of your script goes to a different object.

           

          By exiting the script with a false/0 result, you tell filemaker NOT to continue with the action that triggered the script to begin with.

           

          Hope this helps.

          • 2. Re: Filemaker Go focus changes after script exit
            rgordon

            It would be helpful to post the script you are using.  Try adding these two lines to the end of the script:

            Commit Record

            Halt Script

            • 3. Re: Filemaker Go focus changes after script exit
              mcrip

              Halt Script turned out to be the best option.

               

              Exit Script [False] did not work (I had already tried that).

              • 4. Re: Filemaker Go focus changes after script exit

                Go doesn't always act like Pro.

                 

                Popups for instance hang around but in Pro they close.

                 

                So, I do a reset of the tab order and clear everything. Now I tell it what I want to tab to next.

                 

                NOTE: I would remove popups and popovers from the tab order.

                 

                If I am in field A, where do I want to go if I tab? This is important in GO.

                 

                Also, some fields need to be set so that tab, enter, etc. do not exit the field. These are options in the inspector.

                 

                You can also consider telling FileMaker what to do next.

                 

                Such as

                Perform script xxxx   <-- this script goes to another layout and returns here

                GOTO FIELD xxxx

                GOTO OVJECT xxx

                etc.

                 

                Go does not have all of the tools of PRO nor does it match Pro in every action.