From Dwayne Wright - www.dwaynewright.com
Go To Record / Request / Page is one of the few commands that does something a little different based upon the mode that you are in. In Browse mode, it will go to a defined record in the FOUND SET (sorry for the all caps, but that found set part is important to remember). The next two options are not used that often but can add to some very interesting scripts. In Find mode, it will go to one of your Find Requests (can’t say that I’ve ever seen this in a script). In Preview mode, it goes to a print preview page.
Via the options pull down menu, you can go to the first, last, next, previous or by calculated value. First will go to the first record in the found set, the first find request or the first page to print. Last will go to the last record in the found set, the last find request or the last page to print. Next will go to the next record in the found set, the next find request or the next page to print. Previous will go to the previous record in the found set, the previous find request or the previous page to print.
The go to record next and go to record previous also have the option to exit after the last. This is used so you can easily exit out of a loop operation that is going from record to record.
The calculation option is used to add an almost unlimited flexibility to scripted navigation. One example is to go to a random record. Recently, I’ve been posting a FileMaker term each day to my Term Of The Day blog. Most of these terms I’ve written over the years in my guides and new terms come to light all the time. I have just over 500 terms currently. In my “Pick A Term” script, it does a find for terms I haven’t posted to the blog yet. Then does a Go To Record script step via the calculation of the Random function times the number of records in the found set. That way, I get a random term to publish every day!
HOW IT IS USED
The Go To Record script step can be used in dozens of different ways. It is commonly used when the designer hides the FileMaker status area from the user. The user cannot navigate record to record by using the flip book. This requires a designed set of buttons to navigate through records. The designer may decide to put background script steps along with the Go To Record steps.
The Go To Record step is also commonly used in looping script operations.
FileMaker will perform a set of tasks on one record, go to the next record and perform those steps again (exiting the loop on the last record).
COOL IMPLEMENTATIONS OF IT
I built a FileMaker solution that audited any change in a number of key fields whenever the navigational buttons were clicked. This background auditing was done on a record by record basis whenever the Go To Record buttons were clicked on.
Got To Know Factor - 6
More info about the author and FileMaker in general, contact me at email@example.com.
© 2007 - 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.