Filemaker Pro Lesson

Script Writing:

Creating and Editing a Find/Sort Script

This exercise requires the file Registrations3.fp7.

Filemaker Pro offers an easy scripting environment that allows you to build a complex series of steps that you can play back quickly and easily. When you create a script, you can run it either by choosing it from a menu, or by creating a button and attaching the script to the button. By attaching the script to a button, you can create a simple interface for novice users that accesses complex database functions. One of the most common reasons for creating scripts is that they are able to recall find and sort requests. By including find and sort requests in a script, you free the user of the system from needing to know the particular find and sort requests necessary to accomplish a certain task.

1. Open the sample file Registrations3.fp7. We will begin our task by creating a report layout that will be used to display the selected found and sorted records.

2. Select View -> Layout Mode. Choose Layouts -> New Layout. Name your layout Participant List and select Columnar/List Report and click Next.

3. Again select Columnar/List Report and click Next.

4. Double click "First Name", "Last Name", "Phone", "Event", and "Past Participant" and click Next.

5. Double click "Last Name" and click Next.

6. Select your preferred theme and click Next.

7. Select the Current Date choice for the lower left footer option and Page Number for the lower right footer option and click Next.

8. Select "Create a Script" and name it "Prepare Participant List" and click Next.

9. Select "View in Preview Mode" and click Finish.

10. Now select View -> Find and type "kayaking" in the event field and click Find.

11. Select Scriptmaker. Choose "Prepare Participant List" and click the Edit button.

12. Click on the first step "Go to layout 'Participant List'" then scroll down the command list on the left to the Found Sets subsection and double click on "Perform Find".

13. Click on the Specify button. You will notice that there is one Find Records action listed with the criteria kayak in the events field.

14. Suppose we decided we want both the kayak participants and the bicycling participants in this report. We need to click the New button and select Find Records from the list of actions. Then we click on the field Event in the list of fields in the lower left hand corner and type bicycling in the criteria box and click the Add button. Now you will see two find actions listed. They will be executed in the order that they appear in the list. Click OK.

15. Now scroll down the list of actions in the left hand window and select Sort. If you click the Specify button you will see that it is sorted by Last Name. Click the Sort Records Action and change the criteria to Event and click the Change button and click OK

16. Select Records -> Show All Records Now select Scriptmaker -> Prepare Participant List. Your list will now show only participants in kayaking and bicycling sorted by Event.

 


 

If you have an RSS feed that would be of interest
to faculty and students at the College of Education
please contact Mary Harrsch.

Last updated: 12/28/2004