14.10.2013 Views

FileMaker Pro 4.1 Mac User's Guide

FileMaker Pro 4.1 Mac User's Guide

FileMaker Pro 4.1 Mac User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5-12 <strong>FileMaker</strong> <strong>Pro</strong> User’s <strong>Guide</strong><br />

Defining scripts<br />

1 Which fields and layouts will the script need? Some steps require a<br />

field to be on the current layout (like Go to Field, Paste Literal, Paste<br />

Result, and Replace), while others don’t (Set Field). Use Go to<br />

Layout to switch to a layout that has the fields your script requires.<br />

1 Should the script switch among modes? For example, use Enter<br />

Browse Mode before modifying data in fields and records, and use<br />

Enter Find Mode before setting up a find request or finding data.<br />

1 Should the script work on all records in the database, the current<br />

found set, or a specific set of records? What if no records are found?<br />

Use one of the find or omit steps to set up the correct records.<br />

1 Which record should the script start with? For example, when using<br />

the Loop step, decide whether the loop starts at the first or last record,<br />

a specific record, or the current record in a found set. Use<br />

Go to Record/Request/Page to select a starting record.<br />

1 How should the script advance through multiple fields and records?<br />

Use navigation steps to move through a found set.<br />

1 Should the records be sorted before the script processes them? If you<br />

use the Loop step, use Sort or Unsort before the loop to order your<br />

records properly.<br />

1 When should the script finish? After all records have been processed?<br />

After a specified condition has been met? Use the If step to perform<br />

a task when the script reaches a specified condition.<br />

1 How will you document your script design? Use the Comment step to<br />

make your scripts readable and understandable.<br />

1 How will you test your script? Use the Pause/Resume Script step to<br />

pause at specific points in your script.<br />

Tip Save a clone (or copy) of your database, and then define and test<br />

your script in it to preserve the original data. After testing the script,<br />

import data from the original file into the clone.<br />

Define scripts in ScriptMaker by choosing steps and arranging them in<br />

the order you want <strong>FileMaker</strong> <strong>Pro</strong> to perform them. If you’re using a<br />

subscript, define it first, and then define the script that calls (uses) it.<br />

1. If you’re defining a script to print, import, export, find, or sort, first<br />

store the settings for the script.<br />

See “Storing settings for a script” on page 5-15.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!