Problem linking the form fields from the signup page to a separate collection for a dynamic display

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

Hey there @ghislain Welcome to the community! :sunglasses:

You’re pretty close :+1:

After your signup action, add a “Create” action to create the town record for the town collection. Ensure that you link the user to that town in the relationship parameter.

Now, assuming you don’t want to create a town for every single user, you’ll want to add a conditional parameter to that action if the Towns > count is equal to 0 where the town name is equal to town input.

You may be better adding the town input on a separate screen where you can control the visibility of the button and a list of the towns to be able to select from if the town already exists.

1 Like

First off, thank you for your quick reply and willingness to help. I was hoping you would chime in.

So, i have done this, as you shown me.
new adalo 1

sadly, same problem

Here is what i have written in my “create” action (i use the “username field” form the signup page)
new adalo 3

It is worth noting that the only options i have with the magic text are related to the logged in user (which make sense since there is nothing else in the app at that moment)

The way i understand what i am “programming” is:

When the user signs in, the “username” input (which will be a town name) will be written in the town collection.

however, it doesn’t specify where…

If i remove the magic text i get the same result and my town collection doesn’t have any town name

Do you mind showing me an example of what you would write in the “create” option, please?

thanks
ghislain

I saw that in your Signup form the Username field is not visible and it means the user doesn’t need to insert a Username. That’s why the record is empty.

Instead of Username you need to add the Logged in user>Town Name. But I guess it will not work because I guess there’s a limitation : How to Send Emails with Adalo - Using Integromat & Custom Actions - Tutorial 🤓 - YouTube. Didn’t tested but worth giving a shot! If not work you need a Custom Form or add this create action on another screen.

Thank you

thanks @dilon_perera

just checked that video you linked up and it is pretty much what i have realised is needed…kind of a buffer exchange or “pivot table” of some sorts.

i am going to repurpose this video 1st and see where i get to before going with Michael’s idea

Also, i’ll post an update with the method i came up with, in case someone is interested

1 Like

Let’s take this one step further. I’ll make a tutorial.

2 Likes

Ok, i realize that i was looking at the problem wrongly.

I only need to update the username field in the town collection.

Let’s see if i can do this now

alright, i got it!!.

i have the user collection linked to the “town stat” collection - 1 user / town but a town can have multiple users

I can MANUALLY change the town stat through the drop down option

Whereas i can’t do the user change in the town stat collection

So my understanding is that -

1 - i need to create a drop down menu field on a screen
2 - the drop down menu will be populated with the town name from the town stat collection
2 - i need a button
3 - when button is clicked, it needs to update the town stat field in the user collection with the town name selected in the drop down menu (what i can do manually)

So, here is my form
ada4

As you can see i have the town name from the town stat collection listed here

So here is the update screen…

And the final product is…taadaaaa :trumpet: :partying_face:

Man what a battle…but it was worth it, the rest will be a walk in the park considering all the other videos i watched!

Thanks @dilon_perera and @Flawless for the help and pointing me in the right direction

  • Ghislain

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.