Hello, I’m trying Adalo for a couple of weeks. I have 3 collections:
Users (users can have multiple categories and multiple things)
Category (category can have only one user and multiple things)
Things (things can have only one user and only one category)
I created a screen with form for editing a thing with visible field “Category” and when i try it on preview mode - it shows me all categories in DB, instead of categories, that belongs to Logged in user.
I think, that Relationships in DB is all good. What am i doing wrong? Please help.
If I understand you correctly, in your “Edit Thing” form, you’d like to restrict category list to those belonging to a user?
If you’re using a built-in form, the behaviour you observe is expected; form for editing a Thing has no idea that thing’s category has to belong to a particular user.
You could achieve the result by building a custom form (assembling it from the components). You could use “Dropdown” component, make it a list of categories and filter it by categories which belong to logged-in user.
Also, one comment for the DB structure: why would you want to connect Thing to a User? Anyway this is already established in a Category. In your structure you could accidentaly have a result of a Category belonging to UserA, but a Thing in this category belonging to UserB.