3 Replies Latest reply on Jan 16, 2009 7:41 PM by disabled_menno

    Back button?



      Back button?


      Is there a way to create a back button like on a browser?  Ideally one that reposts the same information you had on the previous page.

        • 1. Re: Back button?

          Howdy filler,


          Yes there is...but its a little tedious, not as simple as dropping in a button.


          First you need a way to track what layout and what record you are leaving before you leave it.  You can do this with two global fields and the SetField command.  When (before) you leave any layout, replace the values in these feilds again and again with the new "just leaving" layout and Record ID's.


          The back button you put in would then run a simple script of:

          GoToLayout [table1::globallayoutfield]

          enter find mode

          setfield [IDField;globalrecordfield]

          perform find


          This can also be done with mutiple "back steps" if you want it bad enough...

          when leaving, SetField[global3;global2], SetField[global2;global1], etc...


          It works just fine, it's just tedious to build.

          • 2. Re: Back button?
               Thanks for the response.  I believe I've tried global fields before for this.  The problem I faced, if I remember correctly, is that if you set the fields for the current layout, etc., when you go to the next layout, it immediately resets the global field (because the new layout is now the current one).  That means you've lost the reference for the last layout.
            • 3. Re: Back button?

              You need a separate file (log) in which you keep track of the position in the db-system you are:


              Every time you change to a different record, or layout or file, you'll have to do that with scripts. I assume that you already do that and then it is not so hard to do. (I speak from experience, I maintain several db-systems with 60-100 files and use it there all the time).


              Every time you activate a navigation-script you pick up your filename, layoutnumber, basetablename, primarykey and send that data to your log. Every time you push the "back-button" you collect the data from the record which is active in your log and remove that record so that you activate the previous record there, then use the just collected data to go to the previous layout/file/record you were in before.


              regards, Menno