When you first start out with FileMaker Pro you will normally hard code everything into your navigation.
This is quite normal, not least because it is natural and easy to do. But, there are several techniques that you can use for navigation.
Some are semi-dynamic, by which I mean they can be context relative, if that sounds a bit technical don’t worry, I’ll go into that a little more in a while.
This is a two part series in which we will look at the navigation technique itself to start with, then in the second part we will look at techniques for making the process more intuitive for users.
About Objects
Early in your use of FileMaker Pro you will either avoid objects because they look really ‘tekky’ or maybe you will stick to what feels more natural, and unwittingly ignore that fact that they even exist.
However, using objects can be very powerful and simplify lots of things within your solution. For a beginner, that statement might sound counter-intuitive, and in all honesty that’s exactly how I felt when objects were first introduced into FileMaker way-back-when..
The truth is that objects are simply stuff-with-a-name. If you have a button or a tab on your layout and you give it a name via the Inspector, or the Info window prior to FileMaker Pro 11, then that ‘thing’ that was nameless just a few moments ago has now become an object. That’s it, in the simplest of terms, something with a name is an object.
In FMP11 this is how you name something to make it into an object, in this example we are naming an object as: nav.List
Prior to FMP11 you use the Info Viewer Window in layout mode, from the View menu.
Using Objects For Navigation
Other ways can be more dynamic, you can use calculations in combination with value lists to present a drop down list of layouts, if you further combine this with a naming convention you can also filter your layout list to exclude certain layouts. Since that’s a more technical approach, in my opinion, I’ll cover that in more detail in a future post and screencast.
I’ve been using layout objects for navigation for a while now. I combine this with custom functions to determine where an object should send me to upon clicking it.
Extending the Technique, by using Merge Variables
Until FileMaker Pro 11 it was a process of manually adding named objects to an object list on the layout, which worked very well. Since the advent of Merge Variables in FileMaker Pro 11 it is possible to use portable/reusable scripting with merge variables to make this whole process more dynamic. An example of this is in the demo file, using the Return object. There is more information on this in the PDF help file, and in the demo you can see the technique in action. Just to be clear, it is an example and not a production version, and you could adapt it for production use.
This tutorial is intended to get you thinking about ways in which you can use layout objects for all kinds of things. I focus on navigation here, but there are lots of ways in which you can use objects to simplify your development process. Whilst it may not appear that this is a simple technique to begin with, you will certainly get it quite quickly, and then apply it.
We’re not talking about a major shift in your thinking, but you may need to think a little differently to uncover the full potential of objects. That’s a journey I’ll leave to you in the most part, I’m just kick starting that process.
Demo File
In the demo file there are some alternative techniques that you can explore, such as window positioning and print set-up. You can modify these to be more efficient or extend them, it’s up to you. You can also find more information in the PDF file that is in the download folder, simply unzip it and start your surgical process of investigation
NOTE: You will need to have the ScriptMaster Plugin from 360Works installed to make this demo work correctly. You can download it here: ScriptMaster by 360Works
Download the demo file here: SOON Demo File
Before jumping into the file, please take a quick look at the PDF Help file in the download. (11 pages in total but you only need the first 6 pages).
Pro’s & Con’s
There are some pros and cons of this technique.
Namely, that it prevents window auto resizing from working properly on at least one side (right, left, top, bottom) due to the presence of the objects there. There may be a work around for this, if you find one – be sure to let me know.
Screencast
About the Author: Darren Lunn is on a mission to help new FileMaker Pro developers to become competent FileMaker Pro Developers. You can connect with Darren on Twitter
No related posts.







