2 Replies Latest reply on Oct 26, 2013 9:58 AM by DavidJondreau

    GOTO Field question

    perjonas

      Hi .. I am relatively new to Filemaker (V12). I have a script that executes on a trigger (OnObjectExit). It checks what one has entered as a City name, and for certanin values, will prepopulate the state and zip code. As the last step, I use Goto Field to advance to the next logical input field. However that step does not appear to execute as it always goes to the next field. If I make the field active and run the script from the script menu, it works as expected. I am assuming that perhaps some script steps do not work when run as a trigger .. is that a correct assumption? ..thanks

        • 1. Re: GOTO Field question
          Mike_Mitchell

          Hello, perjonas.

           

          Your difficulty is coming from the fact that the OnObjectExit trigger fires before the event that triggers it. So here's the sequence:

           

          1. User tabs to go to the next field.
          2. Trigger fires.
          3. Script executes, terminating with the focus in the field you desire.
          4. Tab event fires, placing the cursor in the next field in the tab order.

           

          In other words, the normal "go to next field on Tab" event that always fires whenever the user presses Tab (or Return or Enter, if you have it set up that way) is overruling your script. To fix it, I suggest changing it to OnObjectSave, which fires after the triggering event.

           

          HTH

           

          Mike

          • 2. Re: GOTO Field question
            DavidJondreau

            Add Exit Script [ False ] to the end of your script.