Solved

FM - Back Button for Layouts/Windows

Posted on 2014-03-20
8
995 Views
Last Modified: 2014-03-21
Boss wants a simple BACK or PREV button so he can return to the layout he was in.  My problem is that we have four files, so Go to Layout [original layout] may work in the same file, but not across dbs.  I've made the latter work by capture the window name before navigating and returning.  So two questions:
1. Go to Layout [original layout] is not working.  Not sure why because it has worked for me before.  Nothing happens when you click a button that calls a script with this as the sole script step.  
2. How would you know if it is a layout from the same file or not.  There is a Get (Filename), so would I just set the equal to a variable and then do an IF statement, IF ( Get (Filename) = $PrevFileName) ?  If this is true, then Go to Layout [original layout] should work, if not then I could have previously capature the window name and then do a Select Window ($PrevWindow).  Does this sound correct?  If so, I just need answer to #1.
0
Comment
Question by:rvfowler2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 25

Assisted Solution

by:Will Loving
Will Loving earned 250 total points
ID: 39943896
1. Go to Layout [ Original Layout ] is designed to work within a script. It will return you to the original layout you started the script on, that being the reference point from which it's working. Outside of a script, there is no "original" reference point.

Most likely, with multiple files, you'll need to have a logging system that tracks which file and layout the user was on and various developers have developed systems over the years which can do that, although most of them work within a single file and you also have the issue of returning to the previous state or found set of records. The more you try to track the more difficult this becomes. You can't easily use Global $$ variables because they are file specific.

I know you probably don't want to hear this but your best best long term is to consolidate all of your user interface into a single file. You can still reference separate files for data if have a need to do that, but you can still put the user interface elements into a single file which make constructing a PREV or BACK button much easier.
0
 
LVL 6

Accepted Solution

by:
slinkygn earned 250 total points
ID: 39944039
The way we'd done this before was to either designate one of the files in a multi-file solution the "main" or "system" file, or to create a separate file in the solution explicitly to serve that purpose; that file would hold a "Session" table of per-user globals that would be consistently used across the project to hold data like this.  (The same can be done in many cases, but not all, with global variables within that file.)  You'd need some scripts in that file that would accept parameters so the main file can set those global variables from its own context instead of that of the file you're in.

That being said, if you use that to store the current and previous file and layout you were on, that may work for you.
0
 
LVL 25

Assisted Solution

by:Will Loving
Will Loving earned 250 total points
ID: 39944473
Seedcode had a product called BackMagic which was designed to do what you are looking for but has discontinued it because: "BackMagic is no longer available--written in FM8.5, it's more complicated than it needs to be and most folks can now write a "back" system in FM13 without our help. Docs follow for folks who already have this installed."

You can find instructions, documentation and downloads at: http://www.seedcode.com/pmwiki/index.php?n=BackMagic.BackMagic 

Also check out Ray Cologon's "Retrace Steps" at: http://www.nightwing.com.au/FileMaker/demos9/demo905.html

And finally this discussion which includes a sample hybrid technique of the above two: http://www.filemakertoday.com/com/showthread.php/29158-Looking-for-a-quot-BACK-quot-button-script
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Closing Comment

by:rvfowler2
ID: 39945290
All helpful comments.  Going to try my solution slinkygn's way and see how it work.  And, yes, Will, eventually I want to go from 4 files to 1; already went from 14 down to 4, just a long process.  :)
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 39945320
As noted, you can always begin by moving the interface elements to your central file and leave the data where it is.
0
 
LVL 6

Expert Comment

by:slinkygn
ID: 39945516
Will actually has a really good document on how to consolidate as quickly and painlessly as possible.  Sometimes folks underestimate how important the order in which you do parts of the process is; it can mean the difference between some quick copy/pastes and hours of rewriting value lists and such.  I thought Will did a very thorough job with all those considerations; his article can save you a good bit of time.

http://www.experts-exchange.com/A_4722.html
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 39945562
Thanks, I already have used Will's article.  It's just that my files are so complex in their TO relationships that I need to be careful not to impact business.   And yes, Will also considering moving interface elements to a central file, but want to think through any ramfications.
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 39946725
You can actually try it without changing your existing system. Just duplicate the interface in the main file but don't give users access to those layouts until you've tested it sufficiently.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question