Creating a function for our Factbox
For this application, we want our FactBox to display information relating to the specific Radio Show we are scheduling. The information to be displayed includes the five show segment requirements and the status of fulfillment (counts) of those requirements by the data entered to date. The requirements come from Playlist Header fields: PSAs Required, Ads Required, News Required, Sports Required, and Weather Required. The counts come from summing up data in the Playline Line records for a show. We can use the Playlist Header fields PSA Count and Ad Count for those two counts. These counts can be obtained through the FlowField property definitions we defined earlier for these two fields.
For the other three counts, we must read through the Playlist Lines and total up each of the counts. To accomplish that, we'll create a Function which we can call from the FactBox page. Since our new function is local to the Playlist Header and Playlist Lines tables...