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

    GOTO Field question


      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

          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.





          • 2. Re: GOTO Field question

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