Free back button navigation for FileMaker 8.5 and up
Easily add Back and FWD buttons to your solution without having to script all your navigation.
BackMagic follows you no matter how you navigate, remembering the layout, active tabs, and status area state. And it’s easy to add to existing solutions.
BackMagic requires FileMaker 8.5 or higher, five custom functions, one unstored calc, and one script. The demo file is completely unlocked and contains everything you need to get started.
BackMagic is free for you to use anywhere, and to modify and extend as you see fit, provided that you keep the attribution to SeedCode in the custom functions & calcs. ( license)
RightValues returns the list of values plus an extra return at the end. This is also the case for LeftValues and MiddleValues.
Thus you are getting a chain of returns with no values built up in $$stack.
Modify your code to eliminate the trailing return and it should work for you.
The BackMagic option looks good, but I like the simplicity of implementing the script.
Phil, these calculations are a grey area for me. What modification would I need to make to the script? Is is it possible to see the value list in $$stack for troubleshooting?
You might put [<<$$Stack>>] on your layout. The square brackets are to give you visible markers at the beginning and end of the variable since the returns will be invisible. You might also use Quote ( $$Stack ) in an unstored calculation field or a show custom dialog script step.
To strip off the trailing return, you can use:
let ( s = RightValues ( $$Stack ; ValueCount ( $$Stack ) -2) ; Left ( s ; Length(s) - 1 ) )
Look at this thread on the Filemaker Development community. Jeremy created a custom function for navigating forward and backwards. No scripts or script triggers are used.