2 Replies Latest reply on Feb 20, 2013 9:50 AM by BillPlunkett

    GO TO OBJECT not working in very simple test.

    BillPlunkett

      Title

      GO TO OBJECT not working in very simple test.

      Post

           I have 3 fields on a layout: A, B and C.  The edit boxes are named in the inspector respectively as "A", "B" and "C"

           "A" has NO triggers set.

           "B" has a OnObjectExit trigger set to run a script that is as simple as

           IF (A not equal B) then (show custom dialog), Go To OBject "A" end if

           With the script debugger active, I run the layout with 1 in A and 2 in B.  The script runs as expected and the error dialog box displays, but C comes into focus.

           I am assuming that "Go To Object" would be like Set Focus To... so the user is back in the original field to correct the mistake.

           what am i doing wrong,

           thanks, b

            

            

            

        • 1. Re: GO TO OBJECT not working in very simple test.
          philmodjunk

               The problem is not with go to object. It lies with how FileMaker processes the "triggering event" when OnObjectExit is triggered. FileMaker performs the script specified for the trigger, then goes ahead and processes the triggering event. In this case, that event then puts the focus into the next field in your tab order even if that is not where the script tried to put it with go to object.

               The solution is to use Exit Script [False] to terminate your script after using either go to field or go to object to put the focus in the desired field. This step keeps FileMaker from processing that "triggering event".

               For more on this issue and which triggers process the triggering event before the script and which process the event after the script, see: Setting up script triggers in FileMaker help.

          • 2. Re: GO TO OBJECT not working in very simple test.
            BillPlunkett

                 That did the trick!

                 Thanks much,  b