msavard Posted June 5, 2021 Share Posted June 5, 2021 I have created a small library site. Each book in the library is entered using a book template. I have the need to keep track of when these books were checked out. In the future I would need to be able to find out how often the various books have been checked out. Would the best way to do this be to create a separate document for each time the book is checked out? Or is there a field type that would store a list of dates that could later be queried? I haven't been able to come up with a good solution yet so any help would be appreciated. Link to comment Share on other sites More sharing options...
netcarver Posted June 6, 2021 Share Posted June 6, 2021 There are several ways you could approach this. You've mentioned one already - using a page per check-out and keeping these as children of the book being borrowed. This is a very reasonable approach and you can get the count of the child pages very easily via the PW API. Each "checkout" page also has it's created date that would track when the book was borrowed. You could also use the FieldtypeTable that's part of ProFields package by Ryan. It's not free but you get access to a very nice package of additional field types. That way you could keep check-outs as a field of the book's page. There's also a way to count the rows in the table via the API IIRC. Another way to do this without going Pro would be to use a simple textarea and enter a new formatted line of some kind each time the book is checked-out, but that is potentially far less flexible in terms of searching the checkout history. Working out how many times a book is checked out is a matter of counting the lines in this field. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now