One part of my app is a library management system. Users (members) can borrow tools and movies, and then return them after use.
Each member has a physical ID card, with a QR code and a member ID number. I’ll use a QR code scanner later, but for now, we just manually enter the ID number into the app when a member borrows an item. Member numbers are simple: 1,2,3, etc. Member numbers are store in the Users collection.
Items in the library also have inventory ID numbers: 1,2,3, etc. Inventory numbers are stored in the LibraryItems collection, along with the actual name of the item.
My third collection is called LibraryRecords. The LibraryRecords collection has relationships with the Users collection and the LibraryItems collection.
The process is supposed to work like this:
A member walks up to the checkout desk with an item he wants to borrow. He presents his ID card, and my clerk enters the member ID number into a text input field in the Checkout screen.
The app checks that member ID number against the Users collection, and displays the member’s profile picture, his/her name and member number, and membership expiration date. This is how we verify that the member is ok to borrow an item.
The clerk then hits the “add items” button, which links to the Add Item screen. On the Add Item screen, the clerk enters the inventory number of the item to be borrowed, and hits another “add item” button. This creates a record in the LibraryRecords collection. Other items can be added, one by one, on this screen, each creating another LibraryRecords entry.
That’s how it’s all supposed to work. Now, here are the problems I’m having:
-
The newly created LibraryRecords entries contain the member ID number, but I can’t get it to record the borrower’s name.
-
The entry also contains the inventory ID number, but I can’t get it to record the item’s name.
Also, (and this may not be a problem, but it seems wrong): the LibraryRecords collection has relationships with the Users collection and the LibraryItems collection, and there are fields for these in each collection, but nothing appears in those fields. The borrower ID number and the inventory ID number appear in different fields. Not sure why.
I have another screen for returning the borrowed items, but I’m not worried about that part right now.
This is enough for now. I’ve made a copy of this part of my app, with a simple users list and inventory list. I’m hoping someone can clone it and give me advice on how to do what I’m trying to do. (@dilon_perera you’ve always been there for me!)
Login: 1@1.com
Password: password
Right now, the library is managed with paper and pen. This app will change our lives more than I can tell you! Please help!