I’m working on an app for my book club. Currently, I’ve 3 collections as of now: Users, Books, and Reviews. I had to set up relations between those three but I’m not sure if I did it right. Having a hard time building app in Adalo, I definitely need someone to look at it and direct me on the right path. Example: A user can be an owner or a borrower, not sure how to set it up either.
Hello @raghavendra.philkana and welcome! Adaloites? Is it an official thing? I like the sound of that but I think Adalolites is easier on the tongue
Anyway, just to help you out a bit:
In your users collection, you can have a true/false property if you want to restrict a user from being both a borrower and owner, although I think a user should be able to borrow and lend books.
How I would do it is to set up relations first:
Books and reviews (one to many)
Users and reviews (one to many)
Users and books (one to many) — lender
Users and books (one to many) — borrower
Books collection properties
Standard details such as name, author
True/False for borrow status
Two screens — one for submitting books to the club, one for borrowing books from the club
Submit books — just a plain form that creates a record in the books collection
Borrowing books — a list of books submitted, with the condition that it’s not borrowed already OR if the book is borrowed, hide the “request book” button
If you want reviews for the books, make sure you have a button on the book details page that leads to a page of reviews, and a form to submit a review.
I think that should give you a rough idea and direction of how to implement it.
@vancewong Hahaa … I just wanted to highlight Adalo as it is such a great tool for non-coders like me.
Relations:
I did set it up already the same as you said, but with some additional relations that were not needed and I removed them now (based on what you said).
Added status in Books collection - True/False option made it damn easy to track.
a) Submit screen - that was the plan and I did it now.
I’ve two questions:
Is it right if I add two more fields one to know who is lending the book now (owner) and who is borrowing (borrower)? Yes, a user can be both a lender and/or a borrower.
The submit book form doesn’t fit inside the workspace … not able to re-size. See attachment.
One as a lender/owner, and the other as a borrower.
So you can add and remove users as borrowers when they borrow or return the books respectively.
For the form — click on the title of the screen at the top, when you see a transform box around the screen, you can resize it like how you would with an image or table in a word doc.