So I have 3 collections, but every time a user submits a new entry, it doesn’t recognize the user.
I have to go in the database and select which user it is for it to then recognize who submitted the entry.
I’ve built another app similarly and that one works like a charm. I don’t know what I’m doing wrong here. I’ve tried everything. Any help is much appreciated.
so basically it goes from Login Screen to Home page then you click on a button that takes you to a page where you fill out the details of your property. Address, description, number of beds, etc…
However, after you submit your property details, it records it in the database, but it fails to recognize who created the list. I’ve set up the relationships and I can even see in the database the column for the “user”, but it’s blank and it gives me the option to pick a user.
After I associate a user to it, I can then go to that users “my listings” page and see the details of the newly created listing. I don’t know how to get the system to recognize the logged in user as the one who just created the listing, without me having to do it manauly from the back-end.
Thank you kind stranger for your help!
When you click on the form that you are using to submit the data, and you go into the fields section.
Is that “user” field visible on the app or is it hidden?
If visible, then check if you manually have to type in the username from there or if it automatically fills it out.
If it is not visible then it will be near the bottom of the fields section. It will be marked “hidden”. Check what data is in the invisible “user” field. It should be set to the current user. If it’s not, then set it to that. This is most likely problem.
For example, on 1:23 there is a “Creator” field (for a Trip), which is set automatically. And the value for this field is Logged-In user.
May be this example could be useful for you.
If you’re using custom-built forms (i.e. you’ve added input fields manually and have a button with “Create” action), then you should check if you have a “Logged-In User” is set when creating the record.
Note: here I assume that you have a relation Users Collection - Properties Collection set as one-to-many, i.e. one User can have many Properties).