Database Reference
In-Depth Information
Figure 17-17. This script checks for the key that was pressed (it's looking for the up and
down arrow keys only) and navigates records appropriately if it detects one. Since the ar-
row keys already do something in Preview mode (they scroll the page up or down a bit),
each test has an Exit Script step with the result of False. The exit steps tell FileMaker to
skip the normal behavior and let the scripted behavior take over. Without the exit steps,
both actions would happen.
2. Select OnLayoutKeystroke .
The Specify Script Options window appears. Here's where you tell FileMaker which
script to run.
NOTE
The sample file already has two triggers for the Customers layout. In this case, it's safe to
apply a new trigger, because it doesn't conflict with the existing ones. But other triggers may
not play well together, so make sure to test your triggers thoroughly.
3. Choose the Navigate Pages script and then click OK .
You're now back in the Layout Setup dialog box.
4. If necessary, turn on the Browse and Preview checkboxes .
You get to tell FileMaker which modes your trigger should run in.
5. Click OK and save your layout if necessary .
Now you're ready to switch to Browse mode and test your trigger.
Press the up and down arrow keys. If you look closely, you see FileMaker is switching from
one page to the next as you do. Switch to Preview mode and test there, too.
Search WWH ::




Custom Search