Database Reference
In-Depth Information
Go to Record/Request/Page
FileMaker has one script step that handles changing records, find requests, and pages. This
may seem strange at first, but it makes sense because it's exactly how the Status toolbar's
topic icon works: If you're in Browse mode, then the step goes to a different record. If you're
in Find mode, it switches between find requests instead. Finally, if you're in Preview mode,
then it flips through pages.
NOTE
You can't run scripts in Layout mode, and scripts can't go to Layout mode, so Go to Record/
Request/Page doesn't apply there.
The Go to Record/Request/Page step has just one option. You get to pick which record,
request, or page to go to from a simple list:
▪ First
▪ Last
▪ Previous
▪ Next
▪ By Calculation
When you lock people out of the usual display and control everything they do through the
script (see the box on Controlling the Display ), the First, Last, Previous, and Next options let
you provide your own customized replacement for the Status toolbar and topic icon.
Another common but more advanced use of this step is to provide a way for a looping script
to end. When you choose the Next or Previous option, a new checkbox appears in the Script
Step Options area, called “Exit after last.” When it's turned on, FileMaker knows to exit the
loop after it's finished with the last record (when you choose “Go to Record” [next]) or after
the first record (when you choose “Go to Record” [previous]). When to exit a loop is no
small matter, as Looping explains.
When you choose By Calculation, you get the chance to specify a calculation with a number
result. FileMaker goes to exactly that record, request, or page. You could use this option if
the record number is in a field, or if you want to skip ahead 25 records each time the script is
run, for example. This technique is more useful than it sounds.
Search WWH ::




Custom Search