Probably the easiest way is to store the starting layout name in a global variable. Then have the back button goto the layout named in the variable and clear the global variable.
I felt the breze as that flew over my head.
Well lets try this. A Global Variable is one that is available after a script has completed running and is available to any other script in the File. To define a Global variable start the variable name with $$ folllowed by what you want to call the variable. So when you open the Calculator layout put a set Variable statement in a scriptbefore going to the calculator layout. You will have to create/use a script to do the navigation and attach the script to the button that opens the layout.
Open calculator Script
Set Variable[$$LayoutReturn; Get ( LayoutName )]
Go to Layout[Calculator]
Script for the back Button on the calculator:
Go to Layout[$$LayoutReturn]
Set Variable [$$LayoutReturn;""]
The second line clears the value of $$LayoutReturn as clean up.
If this is difficult you may want to take a look at some of the FileMaker Books or The FileMaker training Material. Probably a good starter book would be FileMaker Pro 11 the missing manual by By Susan Prosser, Stuart Gripman.
1 of 1 people found this helpful
Bruce correctly says "is available to any other script in the File", the key word being File. If your solution uses mutiple files, then the global variable won't work, you'll need to use a global field instead. You only need to define the global field in one of your files, and your files will need to have an external reference to the file, but the beauty of global fields is you don't need to create a relationship to access it. Another option is instead of just going to the calculator layout, you could open up a new window and go to the layout. That way, the user can go to any layout and just bring the calculator layout into focus if it's already open. You can also optionally close the calculator window to bring the previous window and layout into focus. Also, if you're not keen on multiple windows and you want to have a generalised back (and forward button) similar to a browser, SeedCode have a free solution called BackMagic.
Dont know if this helps I just have a button with Go to layout if you leave it blank it goes to original layout which i believe is the one you were on last
That was the first thing I tried but nothing happens.