Handy Library Manager
 for Windows


Help, how to topics > Custom Views > How to bring up a list of my overdue check-outs by borrower type?


How to Retrieve a List of Overdue Check-outs by Borrower Type

How to Retrieve a List of Overdue Check-outs by Borrower Type

Objective: I want to generate a list of overdue check-outs specifically for a certain borrower type. For instance, I’m interested in seeing which books my patrons labeled as "Child" in their records have checked out and are currently overdue. I do not want to include check-outs from borrowers classified as "Adult."

Solution 1: In the 'loan.map' file, define the mapping for the EXTRA1 and/or EXTRA2 data fields. By setting 'EXTRA1=TYPE', the borrower's type value will be stored in the loan's EXTRA1 data field. This will allow you to sort, group, and search by borrower type in the loan transaction table. You can find the 'loan.map' file in the 'C:/handy_lib/data/db' folder.

Solution 2: Refer to our help topic on how to create a query in the custom views window for more options.


SELECT B.NAME, B.TYPE, C.TITLE, A.RETURNDATE, A.DUEDATE, A.LOANDATE FROM LOAN A JOIN BORROWERS B ON A.BOR_IDNO=B.BOR_IDNO JOIN LIBRARY C ON A.ITEM_IDNO=C.IDNO WHERE B.TYPE='Child' AND A.RETURNDATE IS NULL ORDER BY B.NAME

Tables and fields used in the query:

A - Loans table (LOAN), data fields: RETURNDATE, DUEDATE, LOANDATE, ITEM_IDNO
B - Borrowers table (BORROWERS), data fields: NAME, TYPE, BOR_IDNO
C - Libary Items table (LIBRARY), data fields: TITLE, IDNO

This part defines data displayed:
SELECT B.NAME, B.TYPE, C.TITLE, A.RETURNDATE, A.DUEDATE, , A.LOANDATE

This part defines what tables are joined and by which data field:
FROM LOAN A JOIN BORROWERS B ON A.BOR_IDNO=B.BOR_IDNO JOIN LIBRARY C ON A.ITEM_IDNO=C.IDNO

This part defines conditions for results to be displayed:
WHERE B.TYPE='Child' AND A.RETURNDATE IS NULL


Question:



Copyright © 2025 · All Rights Reserved · PrimaSoft PC