Database Reference
In-Depth Information
You're telling the subscript to pass the value in the $unbilledItems variable back to
the main script.
Whew! Finally, the Find Unbilled Activity script is finished. It should look like the one in
Figure 17-25 .
Figure 17-25. The completed “Find Unbilled Activity” subscript. It finds and counts the expenses
and then does the same for timeslips. This serves two purposes in the final process: The $un-
billedItems variable helps the Create Invoice for Job script decide whether it should create an
invoice or not, and FileMaker uses the found sets later to create line items.
NOTE
Some developers like to make a note at the top of any script that uses a script parameter telling them
what should be in the parameter. It can save time later when you're troubleshooting because you can
use Script Debugger and the Data Viewer to make sure the script parameter is being set and contains
the proper value.
Adding a Script Parameter to a Perform Script Step
You've just written a script that uses a script parameter containing a Job ID when it finds un-
billed timeslip and expense records. Now you have to make sure the script gets the Job ID
when it runs. The main script, Creating Invoice for Job, will be run by a button on the Job
layout. You could set the Job ID in a script parameter on that button, but since script para-
Search WWH ::




Custom Search