Need Quick Help

Hi,

Need quick help.

I have an existing table of Owners and Pets. Owners can have many pets and Pets can have many owners. That’s the intended relationship, which I think is people refer to as many to many.

Under the Owners table, I have name, address, contact, email. Everything is straightforward except the pets column, which I want to show many pets under the owner. AppSheet set that column as a Ref which does point to the pets table, however it only shows one pet when I want it to show many.

Also on the Pets table, I have pet name, breed, color, also straightforward but I have on the table an Owners column which AppSheet also automatically sets as a ref, but I want it to show all the owners of the pet.

I guess what I need help with is:

  • How do I configure my sheet (Google Sheets) to accept a many to many relationship
  • How do I configure my tables (in AppSheet) to accept a many to many relationship

I’ve read about bridge tables but the person was talking in Greek. I was hoping someone could dumb it down for someone who’s got zero coding knowledge (which is why I went with AppSheet). Let me know if there’s any more information I can provide to give my question more clarity.

Thank you!

Hi,

Create another table Assignments ( ID / Owner / Pet )
Owner ref to Owners Table
Pet ref to Pets table

This way under:
Owners you will have the Assignments (Pets)
Pets you will have Assignments (Owners)

4 Likes

Wow, I can’t believe it was that easy. Just had to change the column names and it was easy after that. Thank you, Alex!

2 Likes