Database Reference
In-Depth Information
5.
Choose Scripts
→
Save Script
.
You want to keep your work, don't you?
Exit Script Result
doesn't do much on its own. You also need to test those results in the
main script. Use an If test, and use the aptly named
Get( Script Result )
function to see
if any records were found that should be sorted and printed. See
Figure 17-11
for a script that
calls Find Unpaid Invoices and then checks its results.
Organizing Scripts that Use Halt Script or Exit Script
The
Halt Script
and
Exit Script
steps are useful exit strategies when you want to abort a
script's execution because some problem has come up. But if you're trying to stop a script to
avoid a problem, you're usually better off without them. Take, for example, the two scripts
shown in
Figure 17-12
.