Tutorial

Table Of Contents
Lesson 8 | Automating tasks with buttons and scripts 43
Rename the button
1. Select the Text tool .
2. Click the button once. The text insertion point appears in the button.
3. Type Preview Labels Layout to rename this button. It may
be necessary to resize this button after renaming it.
Test the button
1. In Browse mode, test the button by clicking it.
Clicking this button performs the script, which displays the Labels
layout and switches to Preview mode.
2. Close Sample Copy.fp7 by choosing File menu > Close.
Find records using a script
You can test a more complex script in the Purchase Orders Starter
Solution that you created in lesson 2.
1. Open the Tutorial folder.
2. Open Purchase Orders.fp7.
3. Add four records, entering ABC Company in the Supplier field in
two records and DEF Ltd. in the Supplier field in two records.
4. Click the Find button under the Purchase Orders heading in
the file.
5. Enter ABC in the Supplier field.
FileMaker Pro completes the company name for you.
6. Click Continue in the status area.
The Find script finds all records that match your request and displays
them in list view.
View the script
1. Choose Scripts menu > ScriptMaker.
2. Double-click Find in the list of scripts.
The Find script appears. Comments that describe how the script
works appear in bold text.
3. Close the Edit Script “Find” in “Purchase Orders” dialog box, then
close the Manage Scripts for “Purchase Orders” dialog box.
4. When you are finished with this lesson, close the file by choosing
File menu > Close.
For more information
In this lesson, you have created buttons and scripts, and used these
two features together. For more information on creating buttons and
scripts, see FileMaker
Pro Help.