February 10, 200520 yr I want to set a button up in my database that allows end users to return to the previous layout. For example, they may be viewing some information they have just searched for but want to quickly view another layout. I need to place a button on the second layout so that they can return (back button) to the previous layout. Much like the back button on a web page. This is different from pressing a button to go to a layout, it needs to 'memorise' where they were before and take them back. Any help greatly appreciated! Many thanks
February 10, 200520 yr In my applications I do like this: I have a global field which stores the last layout visited. In the script moving the user from layout 1 to layout 2 there is a line: Setfield(storedlayout;Get(currentlayoutname)) Then you can use your back button with the line: Go to layout (Getfield(storedlayout))
February 10, 200520 yr Hayley, building navigation history is not a simple problem. David's suggestion gives you the last layout visited, but it is likely you would want to go back several steps from any given layout. Also, as you navigate backwards, it is likely you would want the found sets (and possibly sort order) to be what they were at the time you visited them. So to build this history to accomodate all that, you would need to keep not only a history of the layouts visited, but the found sets while on those layouts. This would probably be done by having a record in another file for each change in navigation (layout change or found set change.) Then you'd need routines in each file (tied in with your navigation buttons,) to add records in this Navigation History file and retrieve the next and previous layout/found set visited. Though I haven't built a solution with navigation history, I know there are people who have.
February 10, 200520 yr Author Thanks David and Ender. I will try david's solution, so at least I have some sort of return button. But, Ender you are right that I will need to retain history of previous visits to other layouts. Something I will try when I have plenty of time on my hands! Thanks again to both of you Hayley.
February 11, 200520 yr Author Cheers efen It is very much appreciated that you sent me an example. I must admit, I am struggling with getting to grips with how to write new scripts! Thanks Hayley.
February 12, 200520 yr Newbies In my applications I do like this: I have a global field which stores the last layout visited....... How do you store the last layout visited in a global field?
February 13, 200520 yr Hayley, you might want to upgrade to version 7 and then use the method on pp. 362-366 of Using Filemaker 7. This is, admittedly, a bit advanced, but it's just what you need.
February 21, 200520 yr I only move around between layouts with scripts and in all the scripts I have a SetField line as I wrote above.
September 24, 200520 yr Transpower, You have my curiosity piqued. Where is the documentation for FM Advanced for an advanced navigation solution? (Also, I have only the electronic documentation for 7, which is about 100 or so pages.) I really would love to be able to create a web-like navigation solution for my system.
September 26, 200520 yr Hi Efen, Good work using the global field as a stack. I thought about a similar solution when I looked into the post but I didn't think of last in first out rule.
October 15, 200520 yr Can anybody provide an example of navigation that saves finds and sorts, not just layouts? I would much appreciate it...
Create an account or sign in to comment