So, let me explain what I'm trying to do:
I own a pet store and I want to upload information about each of our pets customers, sometimes a customer have more than one pet.
So my idea is the following: the database is filled and updated by the administrator, because of that I can't connect using the ID of the member nor the owner, in adition I want to conect a member to one or more entries in my custom database.
So as my logic goes it would be better to conect the database and the memeber using the Email of the member with an email field, is this possible? also how would be the workaround deciding which entrie is showing? using a dropdown?
Hi Carlos,
I suggest you to read the link below, you will get an explanation on how creating your own Members Area with code.
https://support.wix.com/en/article/wix-code-tutorial-building-your-own-members-area-with-code
Moreover, read about the getEmail() and Query() function.
By using them you can locate the current user's details from your collection and present them on your Member page.
https://www.wix.com/code/reference/wix-users.User.html#getEmail
https://www.wix.com/code/reference/wix-data.html#query
In addition, I suggest, that the query field will be based on the user's ID and not email.
Using ID is more correct way to base your query function on, since its a unique field and that way, you can be sure that the result you get is genuine.
you can read about that at the link below:
https://support.wix.com/en/article/wix-code-about-database-collections#system-fields
Have a nice day and best of luck!
Thank you very much!, i'll try all of your sugestions