Returning to Active Portal

Discussion created by BobMaher on Apr 27, 2016

Hi Folks.  After struggling for a while on this issue I'd like to post a solution I have worked out.  I'd be interested in what others think, possible refinements, etc.



Filemaker [I’m using FMP 14 Advanced] does not make it easy to return from some other layout to an original Layout, and having the original layout go to a particular originally-active panel tab.  After some research and trial I came up with the following solution:


The approach involves two stages. 

The first stage uses a script that, for the original layout, captures the original Tab Panel’s active tab for later use. 

The second stage is to use a different script to ensure that when, returning to that original layout from somewhere else, the original panel tab is made active.


Using an example of going to/fro a “Home" layout.  This layout contains a Tab Panel with each of its tabs having an assigned name.  [Assigned in: Layout Mode/Selected Panel Tab/Inspector/Position tab/Position: Name]


  1. First Stage: for the Home layout: On a Tab Panel, use an “OnPanelSwitch" script trigger to invoke a “Current Home Layout” script.  Here is the script:



Step 1 captures into the $$HomeTab global variable a two-line text value.  The first line is the tab number.  The second line is the name assigned to the tab.


This script is triggered each time user changes tabs.



  1. Second Stage: A second script, “Go Home” is assigned to a “Go Home” button placed onto other layouts.  Here is the second script:




As explained in the comments on line 3, line 4 contains the GetValue function to obtain the Tab name for use in the Go to Object function.



Seems to work fine.  This approach likely could be extended for Tab Panels that are placed within a tab on another parent Tab Panel.