Joe Harkins Posted March 7, 2004 Posted March 7, 2004 I have a solution with 10 files and roughly 100 layouts. As you can imagine, a pretty complex navigation system was required. But there is still one thing missing. I'd like to add a "back button" so that the user can return to the previous record and layout in any file from any layout in any file. In other words, I want it to behave like a browser back button. It seems to me that it's such a basic thing that there would be a script command for it in ScriptMaker. I've tried creating a script that calls for "Go to Layout [original layout]" but that does nothing at all. In fact I wonder what this command actually does if it doesn't take you back to the original layout. It rasies the question of what is FM talking about when they speak of "original layout?" Anyway - can anyone suggest a script that would accomplish this? I assume that the script would capture the record ID number but how can it capture the layout name?
stanley Posted March 7, 2004 Posted March 7, 2004 Joe: The "Go To Layout [original layout]" command is used when a script might be called from a number of different places, so that after going to other layouts, you can still return to wherever you originally came from. What you might want to consider is storing your layout & record information in globals each time you switch layouts or records. So, if you've got a button that switches layouts, you could set your globals before the layout switch occors. Then you can have a back button (on every layout) that just calls up those globals and implements the record & layout data held there. -Stanley
stanley Posted March 7, 2004 Posted March 7, 2004 Joe: Here is a simple sample - ignore the actual data, it's from another example I did for someone, but the scripts and the globals do what I explained above. -Stanley Current_Database.fp5.zip
RalphL Posted March 7, 2004 Posted March 7, 2004 Take a look at this tip file: Mac http://www.buliga.it/TipFiles/Navigation.sit PC http://www.buliga.it/TipFiles/Navigation.zip
Joe Harkins Posted March 7, 2004 Author Posted March 7, 2004 It looks like this is what I need. Now all I have to do is figure out how to integrate with with my solution. I'm not very familiar with Globals so I need to ask a few dumb questions. Am I right that my first step would be to create global fields in every file, similar to your gFileBAck, gRecordBAck and gLayoutBack Etc.) and then install them on every layout and record in every file - but then see my next question Right away I have another question. I see that gFileBack is only your Menu file. My solution has a Main Menu file that is used on startup to capture user name for permissons and forms configuration so I'm guessing all the gFields would be defined there as you have them, right, including that one? But why is the gFileBack only defined in this Menu file? And finally (for the moment anyway) why is there a blank layout in each file invoked by a script? What does that do for your solution? Thanks again for your help. Joe
RalphL Posted March 7, 2004 Posted March 7, 2004 Thanks for crediting me with these files. They are not mine. G. Pupita is the developer. I will have to study the files before I can answer your questions.
RalphL Posted March 8, 2004 Posted March 8, 2004 First about globals: global fields are not part of a record but they are available to every record. Therefore you will not have assign values in every record. As for as layouts I would include them in an all fields layout. The fields gFileBack, gRecordBack and gLayoutBack and gFileForward, gRecordForward and gLayoutForward, gFile, g Record and gLayout are only required in the Menu file. The fields gRecordID are required in the other files.
Recommended Posts
This topic is 7569 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