Hayley Posted February 10, 2005 Posted February 10, 2005 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
David Holmberg Posted February 10, 2005 Posted February 10, 2005 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))
Ender Posted February 10, 2005 Posted February 10, 2005 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.
Hayley Posted February 10, 2005 Author Posted February 10, 2005 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.
efen Posted February 10, 2005 Posted February 10, 2005 Here's a simple example -- it's not pretty but it works. BackButton.zip
Hayley Posted February 11, 2005 Author Posted February 11, 2005 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.
Newbies vman Posted February 12, 2005 Newbies Posted February 12, 2005 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?
transpower Posted February 13, 2005 Posted February 13, 2005 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.
David Holmberg Posted February 21, 2005 Posted February 21, 2005 I only move around between layouts with scripts and in all the scripts I have a SetField line as I wrote above.
Steverino Posted September 24, 2005 Posted September 24, 2005 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.
Sanjai Posted September 26, 2005 Posted September 26, 2005 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.
Steverino Posted October 15, 2005 Posted October 15, 2005 Can anybody provide an example of navigation that saves finds and sorts, not just layouts? I would much appreciate it...
Recommended Posts
This topic is 6981 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now