Database Reference
In-Depth Information
Figure 17-29. Here's how your finished Process Timeslips script looks when you're done.
The tutorial told you how to prepare the database to start the loop, which steps belong in-
side the loop, and what steps to take when the loop was finished. But in the real world, a
good technique for writing a looping script is to create it as if it were working on a single
record. Then when you've got it working properly for one record, you can add the Loop and
End Loop steps to make the process repeat.
3. Add a Go to Record/Request/Page step after the If step. Set the Go to Record
option to First .
You want to make sure the loop begins with the first record in the found set so nothing
gets missed.
4. Add a Loop step below the Go to Record step .
You'll also get an End Loop step. Most of the rest of your script's steps will go
between the Loop and End Loop steps.
5. Add a Set Variable step as the first step in the loop. Name the variable $de-
scription and then set its value to Expenses::Expense .
Search WWH ::




Custom Search