Add & remove items from a list

Hey guys,

I watched a few videos in how to add and remove information from a list of things, however, I cannot make work on my app and hope someone can help me.

So, I have two datatypes (Account Child and Contacts) there are related to each other as you can see in the screenshot below:

Contact datatype

Child_account datatype

I created a popup (type of content: Contact) to updated the contact information and a custom state to select the account child (video to see the frontend - Vidyard Recording)

When the update button clicked, a workflow runs to update all contact information in the database, but the contact is not updated in the account child datatype.

I’m using “Make changes to a list” and using the information of the custom state to update the Account child datatype, and Bubble accept this expression but it’s not updating the database. See the screenshot of the workflow below.

Workflow

Account_child App data

I hope someone can help me to figure out what I’m doing wrong.

Thanks,
Bruno

Hello!

Add list … adds to a list

If your popup has the complete final list … then use :set list

Now … I noticed that you are using :plus item. This adds a single entry to a list. Like I said … if the popup has the complete list then just use :set list.

Getting the gist of single vs plural in Bubble takes a while and it comes more natural the more apps you build … or the more sophisticated you make your existing app.

Hope this makes sense and good luck with your app :+1:t2:

Hey @cmarchan ,

You’re always helping me - thank you :wink:

Unfortunately, my popup doesn’t have the complete list and had to use the plus item, but it’s working pure well now.

However, I’m facing a new issue: Remove the value from the previous list

I created the following workflow but it’s not picking the right value, it’s removing any value in that list. Do you have any idea what I’m doing wrong?

To remove one entry use “remove” instead of “remove list” which removes the entire list

Thanks @cmarchan!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.