Hello all,
I need your help with linking tables. I have watched about 20 videos on YT from different creators and i don’t find what i am looking for.
Hope you guys can help, thanks in advance.
On my signup page, i have added a field name “Town name” (as you can see below)
This in turn is shown in the “users” collection
I have created a second collection called “town details” as you can see below
Now, what i want to do is display the town info from the “town details” collection when the town name in the “users” collection is the same as in the “town details” collection.
In my broken coding (from long time ago) past, i’d like to have something along the lines of:
if users.town_name == towndetails.town_name
then “display town picture, country, population” on a new screen.
My problem is as follows:
1 - i want this “if / then” loop to be done in the background and i am failing
2 - as it stands those 2 tables are not linked.
3 - when i link them, by adding a relationship i only see the option to link to the “users” collection as a whole and NOT to the “town name” in the “users” collection.
Since 1 user can only input 1 town, but 1 town can have multiple users, i have chosen the 2nd option in the relationship option menu
so my town collection table looks like this now (i have changed the name of the relationship field)
and my users collection table looks like this
However, this doesn’t work, those 2 fields are not connected.
What am i doing wrong? do i need a 3rd table to link those 2 together?
Thanks in advance, this is really annoying me