Jump to content
Server Maintenance This Week. ×

simulating a "back" button


This topic is 7355 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 7355 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.