5 Replies Latest reply on Aug 6, 2014 9:25 AM by philmodjunk

    Go To Field Not Working

    marketg

      Title

      Go To Field Not Working

      Post

           We have a strange problem going on.

           We have two database files, FileA.fmp12 and FileB.fmp12.

           FileA (our Invoice File) holds a portal with invoice line items from FileB. We have written a trigger script on modify that when a user modifies one of the fields (via selecting a choice from a drop down menu) a scrip triggers that fills in information in two other fields on the same line item in the portal (which is working) and then leaves the user in a quantity field for them to fill in how many they want.

           The strange part is, when the script runs, everything works, except the last part of the script that uses the GoTo Field "Quantity", and instead puts the user at the first TAB order on the layout. If we put a PauseScript right after the GoTo Field, the script will put the user in the quantity field for them to enter a quantity, but the minute you select the "continue script" it throws the user to the first TAB order on the layout.

           Any help here would be greatly appreciated.

           We are using:

           Mac OS 10.9

           Filemaker 13

            

           Thanks

            

           Jason

        • 1. Re: Go To Field Not Working
          SteveMartino

               Did you try to name the field, then use 'Go to Object' instead?  Seems to work better sometimes. Or, duplicate and use the same Go to Field script step twice.

               I think, and I don't know the right technical reason, if the script or another script trigger commits data or refreshes (redraws), the Go to Field script step sends you to the first field in the tab order.

               edit:  If you didn't already know, to name a field, or any object, click on field in layout mode, open Inspector>> Position Tab (in FMP12).  Where you see name, type in a name for the object.  Then refer to that name in the script (spelling counts)

          • 2. Re: Go To Field Not Working
            marketg

                 Steve,

                 We did try the GoTo Object as well and it did the same thing. So we just went back to the GoTo Field option and are trying to get it to work. We have not tried the double script step of Go To Field. We will try that.

                 Thanks Steve

                 Jason

            • 3. Re: Go To Field Not Working
              philmodjunk

                   I suspect that your script includes a commit records step which then changes the focus from the portal row back to the layout as a whole--which will drop the cursor into the field that is specified as first in the layout's tab order. Your "OnOBjectModify" script may also be tripping a different script trigger that performs a second script that changes the focus.

                   The quick fix is to set a variable to Get ( ActivePortalRowNumber ) and precede go to field (or object) with go to portal row and use the variable to specfiy the portal row and to also keep any such other trigger controlled script from interfering.

                   A more long term fix might be to remove this script completely. With the correct relationship, you can set up this fields to auto-enter the needed values instead of by script.

              • 4. Re: Go To Field Not Working
                marketg

                     PhilModJunk,

                     The script does not have a commit record step. It really is a simple script, that has three Set Field commands to auto fill in three particular fields and then the last step is GoTo Field Quantity. Those four steps are wrapped in an IF statement to validate if is should run.

                     So basically.

                     IF <condition is met>
                     Set Field A
                     Set Field B
                     Set Field C
                     Go To Field Quantity
                     End If

                • 5. Re: Go To Field Not Working
                  philmodjunk

                       to repeat:  Your "OnOBjectModify" script may also be tripping a different script trigger that performs a second script that changes the focus.