SOLVED - Function as a library

nclaypool

Member
Couldn't come up with a better title. I'm doing some foundational planning on creating a library management system in Fabrik. Our needs are incredibly simple but there's one part I'm trying to figure out if I could do via Fabrik or if it would require a custom written PHP page to handle. So here's the rough idea of how it would be laid out.

  • Three lists
    • Patrons (with barcode for library card)
    • Catalog (with barcode for item label)
    • Check out records
  • Check out records would be used to keep historical records on frequency of checkouts so managers know when to retire items.
  • Simply put the check out record table would contain the following items
    • ID
    • Checked Out Date
    • Due Date
    • Item ID
    • Patron ID
    • Checked In Status (0 for out, 1 for in)
Checking out would be easily accomplished using a Fabrik form, but can't wrap my head around checkins. What I envision is a singular field where the item's barcode is entered or scanned. Upon submission it would cross-reference the catalog to determine the item's database ID from "Catalog" then update any record that's found in "Check out records" that matches that item ID and has its "Checked In Status" field set to 0, it would then set that field to 1 to indicate the item is checked back in.

Hopefully that all makes sense. From a 30,000 foot view it seems simple and I can envision how it would work as a bare PHP file but if Fabrik could do most of the legwork for me that'd be ideal, just not sure how to ask it to do that. Your help is greatly appreciated!
 
Simplest to start with would be a semi-manual system. Have a copy of the list with a pre-filter on it so it only shows checked out rows (where check_in = 0). Use either a normal element list filter or a search form with just an item id field to search for the item on that copy of the 'checkout' list. Have an "update col" plugin on the list which sets checked_in to 1, so it's a one click to check it back in.

If that works out, you can look at extending it to fully automate the process. But that would get you going.

-- hugh
 
Simplest to start with would be a semi-manual system. Have a copy of the list with a pre-filter on it so it only shows checked out rows (where check_in = 0). Use either a normal element list filter or a search form with just an item id field to search for the item on that copy of the 'checkout' list. Have an "update col" plugin on the list which sets checked_in to 1, so it's a one click to check it back in.

If that works out, you can look at extending it to fully automate the process. But that would get you going.

-- hugh

That would probably work, thank you for the idea. Just from a theory standpoint, how would the full automated next step look. Not looking for code just a general idea of where I'd go next when I'm ready?
 
Dunno. Haven't come up with a plan for that yet.

It'd probably be easiest just to roll your own little chunk of code to do it in a PHP form submission script, on a simple "table-less" form. One element, the item id. In the submission script, just do a simple query to set checked_in = 1 for that id on your table.

-- hugh
 
Dunno. Haven't come up with a plan for that yet.

It'd probably be easiest just to roll your own little chunk of code to do it in a PHP form submission script, on a simple "table-less" form. One element, the item id. In the submission script, just do a simple query to set checked_in = 1 for that id on your table.

-- hugh
Okay, thank you for allowing me to pick your brain. Good stuff!
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top