The administrator can save work by turning on the auto-checkout feature. Auto-checkout automatically assigns available items, as they are checked in, to pending requests in the database. With auto-checkout selected, the item returns to the database briefly and then automatically goes to the next person in the queue.
The auto-checkout switch applies only to the current item. Auto-checkout happens only if the auto-checkout switch is selected and a request exists for the current item. If the switch is turned off, the administrator must return to the checkout screen to check the item out.
If auto-checkout is in use, the CML application uses the borrower# to display the requester's name and location to help the administrator deliver the item.
The check box to invoke auto-checkout is displayed on the frmCheckin form on the Checkin.asp page:
<TD>Auto—Checkout: <input type ="checkbox" name ="chkCheckOut" checked></TD>
This Checkin.asp page also processes this form, in the following code. If any requests exist for the current bib#, three of CML's COM objects are now used. A list of requested titles for this bib# is returned by the Requests method of the Admin object. Next, the item's barcode is passed to the Checkout method of the Admin object to actually check out the requested item to the borrower. After this, details of the checkout operation are displayed, using information from the User object.
If CInt(Request.Form("chkCheckout"))= 1 Then
'--- If AutoCheckout, search for other requests for this bib#
Set rsRequests = objAdmin.Requests(nBibNo)
If Not rsRequests.EOF Then
Set objUser = Server.CreateObject ("CML.User")
objUser.ConnectionString = objAdmin.ConnectionString
borrowerNo = objAdmin.CheckOut(barCode, DateAdd("d",Application("CheckoutPeriod"),Date))
objUser.GetInfoFromTable (borrowerNo)
Response.Write "<tr><td COLSPAN=3>Item checked out to: " & objUser.FullName & " (" & _
rsRequests("Location") & ")<br><font SIZE=-2>" & rsRequests("Comment") & _
"</font></td></tr>" & vbCrLf
Else
Response.Write "<tr><td COLSPAN=3>No more requests for this item exist. Item was checked in.</td></tr>" & vbCrLf
End If
Else
Response.Write "<tr><td COLSPAN=3>Item has been checked in.</td></tr>" & vbCrLf
End If
If at this moment no requests exist for the item, a message to that effect is displayed.