From Dwayne Wright PMP
Certified FileMaker Developer
Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit. For the best experience, please visit the journal directly by clicking (here).
In this example, we show a very easy technique of moving from one portal row to the next via buttons. On the surface this seems to be a very trivial example but it does show that you can control FileMaker's ability to navigate portal rows. This can become very helpful as you start to build larger and more complex scripts and interfaces.
FIRST, PREVIOUS, NEXT and LAST
On our layout, we have 5 buttons which are First, Previous, Next and Last. These will allow users to navigate portal rows and can come in handy if your audience is new to FileMaker. For example purposes, we show a portal listing the seasons of the year which are Spring, Summer, Fall, Winter and Football. The last is my favorite, I must say. These four buttons are not even attached to a script but are wired to button action choices. You could certainly script this action and you might want to if you wanted to run some other operation piggy backed to the portal row navigation action.
PORTAL ROW VIA AN ENTERED NUMBER
We also added a button to go to a portal row by an entered number. In this case, we did attach this button to a script and all you need to do is choose a portal row number from the radion button value list above the button and then click the button.
This is a somewhat lame example of the "Go To Portal Row By Number" feature. Generally this is used in more sophisticated batching operations that may involve many records. The ability to go to a portal row via a calculated value opens up plenty of options for the creative programmer that stumbles upon unique needs.
A MODEST TWEAK TO THE SCRIPT
I only added one tweak that is a little off of the beaten path. If the Portal Number field is empty, the script brings up a dialog box asking what portal row you want to go to . The script looks like this ...
Go To Portal Row [ Select By Number ]
Go To Portal Row [ Select, "Portal Number"]
** which is the name of the field **
An example file can be downloaded by clicking (here)
More info about the author and FileMaker in general, contact me at firstname.lastname@example.org.
© 2008 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.