How to add a thing to a list that's in the data base from workflow?

sorry for my english, hope I will be able to explain it well.
I have a dataType - “Event”. Event has a field “Customers”, and this field is a list 0f users.
I created an event in the data base (let’s call it event1) as a test with an empty list of customers.
I also added a button on the website that is called “add user as a customer”. My target is that pressing on the button will add the logged user into the list of customers of event1 that I saved in the data base.

Now I"m looking at the workflow of the button, I clicked “make changes to a list of things” and now i"m stuck - I can’t seem to be able to access the list of customers of event1. I tried looking with the search option but it didn’t help. Can someone please explain how to access it?

in addition, I chose “make changes to a list of things” because I want to add a thing to the end of the list (a user to the end of a list of users). if this is not the correct way - I’ll appreciate hearing what is the correct approach (:

if it is not clear I will upload pictures as well
thank you in advance!

Hi @Alice123 :wave:

So… to make a change to a thing you will have to tell Bubble what thing you are trying to change.

In the field to specify the “thing to change” run a “Search for” and choose your database events.

In the constraint section, constraint the search for events that have the “uniq_id” equals to event1’s uniq_id. You will have to check on your database this value…

Now, you will need Bubble to take the fist item of the list of all events he will find, even we knowing it will be only one. You will do this as below:

Search for events:first item

Now you will see that all the fields from you events will be visible to you.

Sorry for all this text without any image. I am in a Uber in my way home :sweat_smile:

Hey! thank you and sorry for the delayed reply. I’m still not sure how to do it, I don’t see an option to search a data base (“run a “Search for” and choose your database events.”). It looks like in the picture, How should I continue from here?
I typed “User” in the “Type of things” because it’s a list of users, and then tried “search for” an Event, because the users list is inside an event datatype that is saved in the database.
thank you in advance!

Hi Alice! No problem!

Note that you selected the action to “Make a change to a LIST of things”. You need to select “Make change to a thing”. Not a list.

In the type, select “events”. And in the field below, do the “Search for” as I said above.

When you select to Search for events, Bubble will pop a modal asking you to constraint your search. It is there you will constraint by the “uniq_id”.

Ps.: Where r u from?

How do I continue from here? I’m new to bubble so still learning to use it.
btw I’m from the Middle East.

1 Like


So, did you already constraint your search by uniq_id ?

This field should be:

Search for Event's:first item

Doing this, you will change the first item of your search.
If your made the constraint by “uniq_id”, the ONLY item in your list of result will be the event1.

To do the constraint, click in the “Search for” text. Bubble will open a modal for you.
It is there you will be able to make this contraint…