Create a record from multi-select dropdown

I have a signup page where I allow new users to create their profile, including selecting the site that they belong to. If the site exists, they select that site. If it does not exist, they can type it in and the site is created. I’m using a multi-select dropdown for this, but setting the max selection to “1”.

What is happening is that I can populate the dropdown from my collection of sites and I can create a new site, if one does not exist, but if I select an existing site, then it duplicates that site in my Xano table.
I’m setting the label and the value to site_name (instead of value being site_id).
image

Site is created and associated to the user:
image

If I create a new user and select an existing site, it duplicates the site in my table:

I imagine I’m missing a validation piece in my workflow, but I’m not seeing it.

Thanks!

It’s difficult to provide an answer based on these initial screenshots, but are users and sites separate xano tables?

Ideally you’d want a table reference field in your users table that is referencing your sites table.

Then create a workflow in weweb that checks whether or not a new site record needs to be created.

More screenshots or a loom video recording showing your database and workflows would be helpful to assist further.

Correct, they are two separate tables, with sites being referenced in the user table
image

Right now, my workflow is pretty simple. Uploads their profile image, populates the database with the user details and navigates. Would I create a true/false split before the sign up action? Not sure how I would create a flow to check if a new record needs to be created.
image

I think this is more of a Xano logic issue, where does the “If site doesn’t exist, it gets created” logic happen?