5 Replies Latest reply on Mar 10, 2009 11:30 AM by R12GS

    A "BACK" button, (like a web browser)?



      A "BACK" button, (like a web browser)?




      I'd like to put a "back" button on some layouts that remembers where a user came from and simply goes "back" to that layout, (and ideally "back" to that "layout and that database").


      I know how to make buttons go to specific layouts, but I'd like to have a generic button that simply goes back to wherever the person came from, just like a web browser.


      Is there a simple function to do this? 



        • 1. Re: A "BACK" button, (like a web browser)?

          I use a very simple script with a global text field, with two repetitions.  I put the script at the start of every navigation script.  It first sets the contents of the first repetition into the second, then it captures the layout the user is currently on (using the Get (CurrentLayout) function) and stores it in the first repetition.  When they navigate again the same 'shuffle' takes place.


          The 'Back' button is a script that goes to the layout named in the first repetition, and does the swop the other way.  Hence the 'Back' button operates as a 'toggle', between where the user is now, and where they were one step previously.


          It is very simplistic, as it only goes back one step, but I've never had any reason to extend it to even 2 steps back.  Usually users simply want to click something to try it, or view the screen, and then go back to where they were.


          I'm sure someone has developed one that is much more extensive, or even simpler.



          • 2. Re: A "BACK" button, (like a web browser)?

            This sounds promising, very much what I want to do,,, (but new ground for me since I have never employed repetitions in global fields).  Could you give the steps?  Maybe then I can see it better.


            Still interested if there is a global 'function" or custom function that handles it, because I have hundreds of buttons and a lot of scripts too.  All navigation scripts would need the new steps. Other problems is that all the buttons (w/no script) would have to be changed over to scripts.



            • 3. Re: A "BACK" button, (like a web browser)?

              What I would do if you want to store several back placements, is create a table for the "session". Each record would hold the record id, current layout & username.


              Upon login to the file or something, clear out old records in this DB for that particular user.


              Then make a button that will activate a script to capture the current layout they've gone to.


               Then, make a global field and store the last record number. Then, when they click back or forward, you could either make a relation to get the previous layout or the latest one (depending on what you want) or make a script that does a find for it and then goes to it. (I prefer the relation.)


              Anyone else have any ideas? 

              • 4. Re: A "BACK" button, (like a web browser)?

                Not sure if this is the type of thing you are looking for:




                An interesting concept all the same - I couldn't quite grasp it though!



                • 5. Re: A "BACK" button, (like a web browser)?

                  Thanks very much, that is (almost) exactly what I was looking for!


                  I "grasped" it, but I don't have the time to put it all together.  I was looking for an easier way to do it, but this is probably as 'easy' as it's gonna get.    :smileyindifferent:


                  There are a few things beyond my ability to create+test efficiently. This is a job for my filemaker programmer.


                  Thanks again!