Nothing's dynamic in FileMaker. What you can do is use a script and use the "Go to Record/Request/Page" function (go to page 'last'). Now it's just a matter of how you want to trigger the script. A button is the most convient way. OR do you want to go to last page on open?.
Originally posted by waddi
I want to be able to dynamicly go back to the last page.
I thought using "status(CurrentLayoutNumber)" and using a repeating field to search for the 2nd to last number. This doesn't seem to work.
This is a very tedious task. You need a global text field that will retain the history of files you've been in, and another that will retain the history of the layout numbers you've bee on. Lets call them gHistoryFile and gHistoryLayout.
Each time the user navigates to another layout, you must trigger a script that will "push" the filename status(currentfilename) and the layout number status(currentlayoutnumber) to the respective fields. Something like:
Set Field[gHistoryFile, "status(currentfilename) & "¶" & gHistoryFile]
Set Field[gHistoryLayout, "status(currentfilename) & "¶" & gHistoryLayout]
Then, when you want to go back, you have to "pop" the top line from each field and load it into another global. You must actually "pop" or remove the top line of the file, and not just read it.
Once you've popped the top line and stored the values in globals, you have to run a script in a master file somewhere that has a series of If/Else statements checking for filename:
Obviously this can get very long if you have a lot of files. Each file must have a "myGoToLayoutScript" (you should name it more appropriately, though). That script will have a simple go to layout [by Field Value] step, where the field is the global that contains the top line of the gHistoryLayout field that you popped earlier.
That's pretty much it. The biggest problem is that you *must* script all navigation, or else the history will be inconsistent.