Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Back button


Biztek
 Share

Recommended Posts

Question:

How do I write a "Back" button script that will go back to the file that a user has arrived from without closing the current file?

 

I'm looking for improved speed.

 

Currently I use a close file script. However, closing the file when it is related to a file that is still open causes the file to open again anyway. This is a double use of server, network and client for each instance. I calculate that there are a minimum of 10,000 instances per month which get doubled by my poor scripting.

 

There are some cases where I have changed the Close script to Open the previous file. This works when there is only one file that a user could have come from to reach the current file.

 

General Information:

I have 20 Macs and PCs on a LAN to a Mac server and things are running well. I'm running versions 5.x for client and server. The solution is currently in beta and has 43 files with many relationships. I develop on a Mac in OS 9.

 

Dana

Link to comment
Share on other sites

There are a number of ways to achieve what you want without closing the file, but for a very simply solution, I suggest that you try using the:

 

Toggle Window [Hide]

 

command. From what you've said it sounds like that will have the desired effect, without closing the file.

 

In fact you don't even require a script. Unless there are other actions that you want the user to perform at the same time, you might just as well attach the command directly to the 'Back' button. wink.gif

Link to comment
Share on other sites

If I have several files to which I wish to return after accessing, say a List file, I simply create a global ID field in the list file (call it "FileID").

 

Then when you use a script to open the list from any other file, simply use Set Field to place the identity of the file you are leaving in the global field: from an invoices file, for instance:

 

Toggle Window (Hide)

Set Field "::List(FileID), "Invoices"

Open List

 

When done in the list, click a button which reads the global and using an If statement returns you to the proper previous file:

 

Toggle Window (Hide)

If(FileID = "Invoices",

Open Invoices,

If( FileID = "Inventory",

Open "Inventory"

 

etc., etc., etc.

 

Hope this helps

 

Tom

Link to comment
Share on other sites

Go here

Database Pros

 

choose

Resource ball , search for Back, First file found is Back and Forward download it , If it is still FM4 corvert it to 5 or 6 or whatever.

Link to comment
Share on other sites

Thanks!

 

After reading your suggestions, I felt kind of dum for not glomming on to them without your help.

 

Dana

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use