Database Reference
In-Depth Information
Copying Scripts and Script Steps
Script importing is a fairly blunt instrument. When you need a little more control, FileMaker
offers a way to copy and paste whole scripts within or even among databases. Simply open
the file that contains the scripts you want to copy and then, in the Manage Scripts dialog box,
use Copy (Ctrl+C [ -C]) and Paste (Ctrl+V [ -V]). Copy the scripts you want to reuse,
open the Manage Scripts dialog box in the target file and then Paste. Check all pasted scripts
to see if any field, layout, or other reference needs to be pointed to another element in its new
location. Copying or importing scripts works best when you need the whole script, and all
the elements referenced in your script are already in place, so that no script steps break on
the way in.
TIP
These features, once the domain of FileMaker Pro Advanced, are now part of normal FileMaker
Pro's toolkit, too.
You can also copy script steps individually or in chunks. In the Edit Script dialog box, select
just the script steps you want and then Copy. Then you either create a new script or open the
script that needs your copied steps. Select the script step just above where you want the next
steps to land and then Paste. Your recycled steps appear in your script. Fix any broken refer-
ences as needed.
You don't even have to move to a new script to find Copy and Paste useful. Sometimes
you'll want to reuse a sequence of steps more than once in a single script. Sure, you can se-
lect the steps and then click the Duplicate button, but then you have to move each step down
into place one by one. With Copy and Paste, the pasted steps stay together and in their ori-
ginal order.
Script Debugger
When you write a script using FileMaker Pro, your testing and troubleshooting routine is
pretty simple. You perform the script and wait to see what happens at the end. In a simple
script, like one that prints a report, you can easily enough see what went wrong, and fix it:
Your script just went to the wrong layout, perhaps. But when you're creating a complex
script that sets variables and works with different sets of records that you can't verify before
the next script step whizzes past, it's devilishly hard to figure out where your script veers off
course. Even simple scripts can go wrong in puzzling ways that you can't detect by reading
over your steps.
Search WWH ::




Custom Search