Interference with the database when I want to create / add values to an entry

Apparently through an input and a button I can not introduce elements directly into the user database, where I had inserted a column with the list of containers to which these users were associated (also the list of containers was taken from another table). So in the database I made another table with the users and the containers so that through input and button I can introduce the containers there. Right up to here? Hope the pictures show. When I create a flow I thought about inserting the command add, or, add list, but in both cases I have an error. What could be the problem? It tells me create a thing in “table name” should be a container while it is text. I guess it is telling me that the user will have to put an already existing container name (I think), but how could I do
Many thanks in advance1 3 2

Without seeing you full workflow and knowing exactly what you’re trying to do I can’t say for certain…

But it looks to me as though you’re trying to create a new container, and then add it to the user’s list of containers…

In that case yes, you’re correct - you can’t add a thing that doesn’t yet exist to a user’s list field.

So all you need to do is first create the new Container, then add it to the user’s container list.

Or, as you rightly say, you can force the user to pick from a pre-existing container (from a dropdown for example) and then add that to the user’s list of containers.

In the above example, you’re trying to add an input’s value (a text) to a list of containers (which should be a container).

1 Like

Thank you very much :smiley:, but I still have the same doubt. You rightly tell me to create a drop-down menu with all the values you can choose from, but I don’t want the user to see all the items. My intent was that the user could write something and that value make it valid only if it is present in my database. Let’s see if I can explain myself better: I have a table where I make the “associations”, where I have two columns, the users and the containers (containers as a list because a user can choose more containers). Obviously then I have the table of users and another of containers.
I would like to create an input with its button to tell the user dude I want to associate this container, then also this other etc. So that I have in the initially empty table or at most with users, also next to the containers that follow? I don’t know if I have made myself clear, I started yesterday with bubble and I have many doubts

So, if I understand it correctly, you want to associate a pre-existing ‘Container’ with a user (either by adding it to a list field on the user, or by creating a separate data-type linking the two), BUT you want the user to type into an input rather than select from a dropdown in order to choose the existing container.

If that’s the case you just need to do a search in order to find the appropriate container.

So, in your workflow action to add the container to the user (or an association data-type) you’ll need:

Container che segue > add > do a search for > containers

With the constraint ‘Container Name’ is (or contains) Input Segui un Container’s value > first item

You’ll also need to add some conditionals so the workflow won’t run if there isn’t a match, and something to display an appropriate message to the user if what they’ve typed doesn’t match an existing Container.

1 Like

I deleted the answers because I had changed something to understand and therefore I was sending you astray. Now I think I did the thing you told me, but the problem remains. “Ass container utente” is the new table where I insert the user who is compiling and the input. “Container che segue” I want to put the container that the user will type and will be characterized by a list of containers (from the other table) recognizable by an ID


this program is very interesting, I don’t know if it’s my logic that doesn’t work. In each case thanks for the help. and if I may, how did you learn? I don’t speak english and i am learning by doing.

I’m not entirely sure I see the logic in having a separate datatype (Ass Container Utente) if it’s going to contain a list anyway - you may as well just add the list directly to the User and cut out the extra step - but maybe there are some minor data search speed/performance benefits?? If the list is small it probably wont make much difference.

Anyway, in regard to the Issue being shown in the issue checker…

Your trying to add a (single) container to the list of containers on your ‘Ass Container Utente’ datatype.

So you’ve done a ‘Search For Containers’, with the constraint for ID container matching the input’s value. So far so good…

A search will always return a list of things (even if there’s only 1 thing on the list).

So you need to add ‘First Item’ to the expression after ‘Search for Containers’ - click the ‘click’ button and select ‘first item’ from the dropdown menu.

That will tell Bubble that you want to add 1 (single) container to the list of containers which will solve the current issue (where you’re trying to add a list of containers) and it should all work as intended.

I’ve learnt Bubble (so far) mainly through trial and error, the manual and reference, and by reading through the forum. Also, dissecting and reverse-engineering templates to see how other people approach certain problems can also be a great way to understand how things can be done.

1 Like

So, I think you are a Bubble genius, thank you very much, the error does not come out anymore but the container does not save me, see if I can by myself. What you just told me about efficiency, I thought too. Except that initially I inserted a list of containers inside the user, but when I wanted to make the connection with the key, the “user” item where to create a new thing did not appear at all, so I invented to put another table .


image