3 Replies Latest reply on Oct 31, 2011 3:59 PM by philmodjunk

    From a portal field back to a parent field

    crtopher

      Title

      From a portal field back to a parent field

      Post

      If I'm in a portal field, how to I script to go to an object or field back on the parent layout - currently I have an 'on exit' script on a portal field that has one step GoToFIeld [field on parent layout] but the field only flashes briefly before I'm back in the same field of the next record in the portal

      Thanks

      Chris 

        • 1. Re: From a portal field back to a parent field
          philmodjunk

          Include Exit Script [False] As the last step of your triggered script. The False value returned by the Exit script terminates the triggering event-which in this case is to put the cursor into the next feld in your layout's tab order. You may want to look this one up under Script Triggers in FileMaker Help as this method applies to many but not all script triggers and it's useful to know which are which.

          • 2. Re: From a portal field back to a parent field
            crtopher

            I'm a dummy! Thanks Phil. I've asked about that before with navigating around tabbed structures. I don't understand it though - is the exit script the default script that exists for all fields to tell FM to go to the next field?

            • 3. Re: From a portal field back to a parent field
              philmodjunk

              Every ScriptTrigger is tripped by some "event" in the database. Each different trigger responds to different evernts and some triggers like OnObjectExt trip the trigger and then let the event that triggered it happen, WIth others, the triggering event is processed and then the trigger is tripped.

              With "Trip first, then process the event" triggers like OnObjectExit, after the last line of the script executes, the database picks up where it left off and processes the triggering event. In this case, that puts the cursor back into the next field of your tab order if you use tab/return/enter to exit the field. The Exit Script [False] step is the option provided to us to keep that from taking place.

              If you look up Script Trigger in Filemaker help, you should be able to find a table of these triggers that will tell you which are which when it comes to processing the triggering event.